Date: Sat, 24 Aug 2013 23:54:06 +0000 (UTC) From: Jean-Sebastien Pedron <dumbbell@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r254819 - head/sys/dev/drm2 Message-ID: <201308242354.r7ONs6D7060147@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dumbbell Date: Sat Aug 24 23:54:06 2013 New Revision: 254819 URL: http://svnweb.freebsd.org/changeset/base/254819 Log: 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: head/sys/dev/drm2/drm_dp_iic_helper.c Modified: head/sys/dev/drm2/drm_dp_iic_helper.c ============================================================================== --- head/sys/dev/drm2/drm_dp_iic_helper.c Sat Aug 24 23:47:31 2013 (r254818) +++ head/sys/dev/drm2/drm_dp_iic_helper.c Sat Aug 24 23:54:06 2013 (r254819) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308242354.r7ONs6D7060147>