From 5b6a63cc2f11a9b00862d13104d1304e082acfe5 Mon Sep 17 00:00:00 2001 From: Antti Palosaari Date: Sun, 10 Jun 2012 00:46:22 -0300 Subject: [PATCH] [media] dvb_usb_v2: add .disconnect() callback Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/dvb-usb/dvb_usb.h | 1 + drivers/media/dvb/dvb-usb/dvb_usb_init.c | 3 +++ 2 files changed, 4 insertions(+) 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); -- 2.39.5