[media] dvb_usb_v2: add .disconnect() callback
authorAntti Palosaari <crope@iki.fi>
Sun, 10 Jun 2012 03:46:22 +0000 (00:46 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 4 Aug 2012 10:56:29 +0000 (07:56 -0300)
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dvb_usb.h
drivers/media/dvb/dvb-usb/dvb_usb_init.c

index 79f8571b9b209b7692ebb3a5e2442a0aa9a770f6..d0c628782f760770a14dd9b5384d7d6c8a6d4ad9 100644 (file)
@@ -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 *);
index 1f0fb11c587c7ad9c9c7d10d376b14102a03235c..976a706b4cc79a670ea1e04c0d0075f788163588 100644 (file)
@@ -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);