Commit 1066d77f authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[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: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent ca42129f
......@@ -257,6 +257,7 @@ struct dvb_usb_device_properties {
int (*frontend_attach) (struct dvb_usb_adapter *);
int (*frontend_detach)(struct dvb_usb_adapter *);
int (*tuner_attach) (struct dvb_usb_adapter *);
int (*tuner_detach)(struct dvb_usb_adapter *);
int (*frontend_ctrl) (struct dvb_frontend *, int);
int (*streaming_ctrl) (struct dvb_frontend *, int);
int (*init) (struct dvb_usb_device *);
......
......@@ -676,6 +676,14 @@ static int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap)
}
}
if (d->props->tuner_detach) {
ret = d->props->tuner_detach(adap);
if (ret < 0) {
dev_dbg(&d->udev->dev, "%s: tuner_detach() failed=%d\n",
__func__, ret);
}
}
if (d->props->frontend_detach) {
ret = d->props->frontend_detach(adap);
if (ret < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment