diff options
author | Antti Palosaari <crope@iki.fi> | 2012-06-10 00:46:22 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-04 07:56:29 -0300 |
commit | 5b6a63cc2f11a9b00862d13104d1304e082acfe5 (patch) | |
tree | 8ff7838808fa0970c15b765290efde168a99c0e9 | |
parent | 823eebac89f7adef3fb75e2a68e9e88be9b4afbe (diff) |
[media] dvb_usb_v2: add .disconnect() callback
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb_usb.h | 1 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb_usb_init.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb_usb.h b/drivers/media/dvb/dvb-usb/dvb_usb.h index 79f8571b9b2..d0c628782f7 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 1f0fb11c587..976a706b4cc 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); |