From a22407faba57c3624beea1a9fad7cbdcf5a19a1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= Date: Sun, 14 Nov 2010 14:24:36 -0300 Subject: [media] Mantis: use dvb_attach to avoid double dereferencing on module removal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Manu Abraham Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/mantis/mantis_vp2033.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/media/dvb/mantis/mantis_vp2033.c') diff --git a/drivers/media/dvb/mantis/mantis_vp2033.c b/drivers/media/dvb/mantis/mantis_vp2033.c index 10ce81790a8..06da0ddf05a 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)); -- cgit v1.2.3