diff options
author | Brad Love <brad@nextdimension.cc> | 2018-12-20 15:14:25 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-06-13 14:29:37 -0400 |
commit | 6f6be371608e88922970a3968f963720ba3871f0 (patch) | |
tree | b3cc2b992b8f1c1d88aa49e4573a7f7840c14bf4 /drivers/media/usb/pvrusb2/pvrusb2-dvb.c | |
parent | cac821d2ea72fbefb16e8af1e192ec70aae29afe (diff) | |
download | linux-6f6be371608e88922970a3968f963720ba3871f0.tar.bz2 |
media: pvrusb2: Add i2c client demod/tuner support
i2c client device is the "new" method to attach to dvb modules, include
support for this functionality. Cleanup code has been added to init in
case of failure, as well as to frontend exit.
Required by Hauppauge HVR-1975
Signed-off-by: Brad Love <brad@nextdimension.cc>
Reviewed-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/pvrusb2/pvrusb2-dvb.c')
-rw-r--r-- | drivers/media/usb/pvrusb2/pvrusb2-dvb.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c index f302f1e7670a..7f5df5c47232 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-dvb.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-dvb.c @@ -404,6 +404,9 @@ fail_tuner: fail_frontend0: dvb_frontend_detach(adap->fe[0]); adap->fe[0] = NULL; + dvb_module_release(adap->i2c_client_tuner); + dvb_module_release(adap->i2c_client_demod[1]); + dvb_module_release(adap->i2c_client_demod[0]); return ret; } @@ -420,6 +423,14 @@ static int pvr2_dvb_frontend_exit(struct pvr2_dvb_adapter *adap) dvb_frontend_detach(adap->fe[0]); adap->fe[0] = NULL; } + + dvb_module_release(adap->i2c_client_tuner); + adap->i2c_client_tuner = NULL; + dvb_module_release(adap->i2c_client_demod[1]); + adap->i2c_client_demod[1] = NULL; + dvb_module_release(adap->i2c_client_demod[0]); + adap->i2c_client_demod[0] = NULL; + return 0; } |