From owner-svn-src-all@FreeBSD.ORG Sun Feb 9 14:02:40 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09DC9A1F; Sun, 9 Feb 2014 14:02:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E4D19184B; Sun, 9 Feb 2014 14:02:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s19E2dDo047817; Sun, 9 Feb 2014 14:02:39 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s19E2dL2047816; Sun, 9 Feb 2014 14:02:39 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201402091402.s19E2dL2047816@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Sun, 9 Feb 2014 14:02:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r261654 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Feb 2014 14:02:40 -0000 Author: dumbbell Date: Sun Feb 9 14:02:39 2014 New Revision: 261654 URL: http://svnweb.freebsd.org/changeset/base/261654 Log: MFC r254819: drm: Don't delete already deleted iicbus child from drm_iic_dp_aux The iic_dp_aux_detach callback is therefore useless: it's replaced by bus_generic_detach. This fixes a "General protection fault" panic during second (incorrect) deletion of the child. Tested by: kwm@ Reviewed by: ray@ Modified: stable/9/sys/dev/drm2/drm_dp_iic_helper.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_dp_iic_helper.c ============================================================================== --- stable/9/sys/dev/drm2/drm_dp_iic_helper.c Sun Feb 9 13:56:37 2014 (r261653) +++ stable/9/sys/dev/drm2/drm_dp_iic_helper.c Sun Feb 9 14:02:39 2014 (r261654) @@ -216,22 +216,6 @@ iic_dp_aux_attach(device_t idev) return (0); } -static int -iic_dp_aux_detach(device_t idev) -{ - struct iic_dp_aux_data *aux_data; - device_t port; - - aux_data = device_get_softc(idev); - - port = aux_data->port; - bus_generic_detach(idev); - if (port != NULL) - device_delete_child(idev, port); - - return (0); -} - int iic_dp_aux_add_bus(device_t dev, const char *name, int (*ch)(device_t idev, int mode, uint8_t write_byte, uint8_t *read_byte), @@ -277,7 +261,7 @@ iic_dp_aux_add_bus(device_t dev, const c static device_method_t drm_iic_dp_aux_methods[] = { DEVMETHOD(device_probe, iic_dp_aux_probe), DEVMETHOD(device_attach, iic_dp_aux_attach), - DEVMETHOD(device_detach, iic_dp_aux_detach), + DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(iicbus_reset, iic_dp_aux_reset), DEVMETHOD(iicbus_transfer, iic_dp_aux_xfer), DEVMETHOD_END