aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/mantis/mantis_vp1041.c
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2010-11-14 14:24:36 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-12-29 08:16:48 -0200
commita22407faba57c3624beea1a9fad7cbdcf5a19a1a (patch)
treef6e2af4ef614bb254858b5db60da3b70bcb25816 /drivers/media/dvb/mantis/mantis_vp1041.c
parent9c81496a88b04206d0607b23b298b6529da1fcb0 (diff)
downloadkernel_samsung_smdk4412-a22407faba57c3624beea1a9fad7cbdcf5a19a1a.zip
kernel_samsung_smdk4412-a22407faba57c3624beea1a9fad7cbdcf5a19a1a.tar.gz
kernel_samsung_smdk4412-a22407faba57c3624beea1a9fad7cbdcf5a19a1a.tar.bz2
[media] Mantis: use dvb_attach to avoid double dereferencing on module removal
Convert the driver to use the dvb_attach macro to avoid the hard dependency on the frontend drivers. The hard dependecy will result in loading a number of unused frontends, and unwanted automatic dereferencing. This fixes a bug where unloading the mantis driver will derefence any attached frontend twice, which will cause an oops if the same frontend is used by another driver. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/mantis/mantis_vp1041.c')
-rw-r--r--drivers/media/dvb/mantis/mantis_vp1041.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/dvb/mantis/mantis_vp1041.c b/drivers/media/dvb/mantis/mantis_vp1041.c
index d1aa2bc..38a436c 100644
--- a/drivers/media/dvb/mantis/mantis_vp1041.c
+++ b/drivers/media/dvb/mantis/mantis_vp1041.c
@@ -316,14 +316,14 @@ static int vp1041_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *
if (err == 0) {
mantis_frontend_soft_reset(mantis);
msleep(250);
- mantis->fe = stb0899_attach(&vp1041_stb0899_config, adapter);
+ mantis->fe = dvb_attach(stb0899_attach, &vp1041_stb0899_config, adapter);
if (mantis->fe) {
dprintk(MANTIS_ERROR, 1,
"found STB0899 DVB-S/DVB-S2 frontend @0x%02x",
vp1041_stb0899_config.demod_address);
- if (stb6100_attach(mantis->fe, &vp1041_stb6100_config, adapter)) {
- if (!lnbp21_attach(mantis->fe, adapter, 0, 0))
+ if (dvb_attach(stb6100_attach, mantis->fe, &vp1041_stb6100_config, adapter)) {
+ if (!dvb_attach(lnbp21_attach, mantis->fe, adapter, 0, 0))
dprintk(MANTIS_ERROR, 1, "No LNBP21 found!");
}
} else {