diff options
author | Antti Palosaari <crope@iki.fi> | 2014-09-04 17:31:40 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-09-21 18:49:18 -0400 |
commit | 1066d77f682e84efb56fbd4e5c8bb236532eccc7 (patch) | |
tree | e0b5f01fc8688d28c53d553a504bf8a2636dc6ea | |
parent | ca42129f867fbc427d709408b3ae35988cc08ed4 (diff) |
[media] dvb-usb-v2: add tuner_detach callback
Add tuner_detach callback in order to allow custom detach. It is
needed when tuner driver is implemented I2C client or some other
kernel bus, but not proprietary dvb_attach / dvb_detach.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/dvb_usb.h | 1 | ||||
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb.h b/drivers/media/usb/dvb-usb-v2/dvb_usb.h index 7e36ee02f957..14e111e13e54 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb.h +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb.h | |||
@@ -257,6 +257,7 @@ struct dvb_usb_device_properties { | |||
257 | int (*frontend_attach) (struct dvb_usb_adapter *); | 257 | int (*frontend_attach) (struct dvb_usb_adapter *); |
258 | int (*frontend_detach)(struct dvb_usb_adapter *); | 258 | int (*frontend_detach)(struct dvb_usb_adapter *); |
259 | int (*tuner_attach) (struct dvb_usb_adapter *); | 259 | int (*tuner_attach) (struct dvb_usb_adapter *); |
260 | int (*tuner_detach)(struct dvb_usb_adapter *); | ||
260 | int (*frontend_ctrl) (struct dvb_frontend *, int); | 261 | int (*frontend_ctrl) (struct dvb_frontend *, int); |
261 | int (*streaming_ctrl) (struct dvb_frontend *, int); | 262 | int (*streaming_ctrl) (struct dvb_frontend *, int); |
262 | int (*init) (struct dvb_usb_device *); | 263 | int (*init) (struct dvb_usb_device *); |
diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c index 02c43b52c906..1950f37df835 100644 --- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c +++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | |||
@@ -676,6 +676,14 @@ static int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap) | |||
676 | } | 676 | } |
677 | } | 677 | } |
678 | 678 | ||
679 | if (d->props->tuner_detach) { | ||
680 | ret = d->props->tuner_detach(adap); | ||
681 | if (ret < 0) { | ||
682 | dev_dbg(&d->udev->dev, "%s: tuner_detach() failed=%d\n", | ||
683 | __func__, ret); | ||
684 | } | ||
685 | } | ||
686 | |||
679 | if (d->props->frontend_detach) { | 687 | if (d->props->frontend_detach) { |
680 | ret = d->props->frontend_detach(adap); | 688 | ret = d->props->frontend_detach(adap); |
681 | if (ret < 0) { | 689 | if (ret < 0) { |