summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/mantis/mantis_vp2033.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_vp2033.c
parent9c81496a88b04206d0607b23b298b6529da1fcb0 (diff)
downloadop-kernel-dev-a22407faba57c3624beea1a9fad7cbdcf5a19a1a.zip
op-kernel-dev-a22407faba57c3624beea1a9fad7cbdcf5a19a1a.tar.gz
[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_vp2033.c')
-rw-r--r--drivers/media/dvb/mantis/mantis_vp2033.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/mantis/mantis_vp2033.c b/drivers/media/dvb/mantis/mantis_vp2033.c
index 10ce817..06da0dd 100644
--- a/drivers/media/dvb/mantis/mantis_vp2033.c
+++ b/drivers/media/dvb/mantis/mantis_vp2033.c
@@ -132,7 +132,7 @@ static int vp2033_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *
msleep(250);
dprintk(MANTIS_ERROR, 1, "Probing for CU1216 (DVB-C)");
- fe = tda10021_attach(&vp2033_tda1002x_cu1216_config,
+ fe = dvb_attach(tda10021_attach, &vp2033_tda1002x_cu1216_config,
adapter,
read_pwm(mantis));
@@ -141,7 +141,7 @@ static int vp2033_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *
"found Philips CU1216 DVB-C frontend (TDA10021) @ 0x%02x",
vp2033_tda1002x_cu1216_config.demod_address);
} else {
- fe = tda10023_attach(&vp2033_tda10023_cu1216_config,
+ fe = dvb_attach(tda10023_attach, &vp2033_tda10023_cu1216_config,
adapter,
read_pwm(mantis));
OpenPOWER on IntegriCloud