From: Antti Palosaari Date: Sun, 10 Jun 2012 03:46:22 +0000 (-0300) Subject: [media] dvb_usb_v2: add .disconnect() callback X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5b6a63cc2f11a9b00862d13104d1304e082acfe5;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git [media] dvb_usb_v2: add .disconnect() callback Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/dvb-usb/dvb_usb.h b/drivers/media/dvb/dvb-usb/dvb_usb.h index 79f8571b9b20..d0c628782f76 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb.h +++ b/drivers/media/dvb/dvb-usb/dvb_usb.h @@ -195,6 +195,7 @@ struct dvb_usb_device_properties { #define COLD 1 int (*identify_state) (struct dvb_usb_device *); int (*init) (struct dvb_usb_device *); + void (*disconnect) (struct dvb_usb_device *); int (*get_rc_config) (struct dvb_usb_device *, struct dvb_usb_rc *); int (*get_usb_stream_config) (struct dvb_frontend *, struct usb_data_stream_properties *); diff --git a/drivers/media/dvb/dvb-usb/dvb_usb_init.c b/drivers/media/dvb/dvb-usb/dvb_usb_init.c index 1f0fb11c587c..976a706b4cc7 100644 --- a/drivers/media/dvb/dvb-usb/dvb_usb_init.c +++ b/drivers/media/dvb/dvb-usb/dvb_usb_init.c @@ -428,6 +428,9 @@ void dvb_usbv2_disconnect(struct usb_interface *intf) if (d->work_pid != current->pid) cancel_work_sync(&d->probe_work); + if (d->props.disconnect) + d->props.disconnect(d); + name = d->name; dvb_usbv2_exit(d);