summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDaniel Scheller <d.scheller@gmx.net>2017-12-11 15:12:49 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-12-14 12:18:38 -0500
commit78e41c16c0b5d47415f01ead3a3730d5b9a6a52c (patch)
treeab984f77235c57bde7ea5525a446b205e21eb6cc /drivers
parent8ff230fb4f48816cd18a558a0d26f580178a26df (diff)
downloadlinux-78e41c16c0b5d47415f01ead3a3730d5b9a6a52c.tar.bz2
media: ddbridge: stv09xx: detach frontends on lnb failure
While the failure handling in dvb_input_attach() has been improved lately so any tuner failure won't result in demod driver modules with a usecount > 0 anymore (thus requiring rmmod -f), there's still an issue with stv090x and stv0910 based tuner modules, in that LNB driver attach failures leave an attached demod frontend driver behind which have a usecount of > 0 in this failure case, due to them not being detached/ released. Fix this by detaching the demod frontends if the LNB driver fails. Richard tested and verified the changes with STV0910 hardware, thus adding his Tested-by. Signed-off-by: Daniel Scheller <d.scheller@gmx.net> Tested-by: Richard Scobie <rascobie@slingshot.co.nz> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/pci/ddbridge/ddbridge-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/pci/ddbridge/ddbridge-core.c b/drivers/media/pci/ddbridge/ddbridge-core.c
index 11c5cae92408..eb43dcb4e5d2 100644
--- a/drivers/media/pci/ddbridge/ddbridge-core.c
+++ b/drivers/media/pci/ddbridge/ddbridge-core.c
@@ -1114,6 +1114,7 @@ static int demod_attach_stv0900(struct ddb_input *input, int type)
0, (input->nr & 1) ?
(0x09 - type) : (0x0b - type))) {
dev_err(dev, "No LNBH24 found!\n");
+ dvb_frontend_detach(dvb->fe);
return -ENODEV;
}
return 0;
@@ -1196,6 +1197,7 @@ static int demod_attach_stv0910(struct ddb_input *input, int type)
lnbcfg.i2c_address = (((input->nr & 1) ? 0x09 : 0x08) << 1);
if (!dvb_attach(lnbh25_attach, dvb->fe, &lnbcfg, i2c)) {
dev_err(dev, "No LNBH25 found!\n");
+ dvb_frontend_detach(dvb->fe);
return -ENODEV;
}
}