aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorAndrew de Quincey <adq_dvb@lidskialf.net>2006-08-08 08:10:08 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 10:53:25 -0400
commit2bfe031df6bd5e3b8e503eba8e3b6461d7c2c27e (patch)
tree2d7288c2221fb6f7ef98ef7a1ee3fef3f04cf87e /drivers/media/dvb/dvb-usb
parentd995506062c974133ba66d0822e58a923d4d74d9 (diff)
V4L/DVB (4386): Convert DVB devices to use dvb_attach()
Only devices using > 1 frontend were ported; ones which did not are left using static binding. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c10
-rw-r--r--drivers/media/dvb/dvb-usb/digitv.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-dvb.c11
-rw-r--r--drivers/media/dvb/dvb-usb/umt-010.c2
4 files changed, 16 insertions, 11 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index ae23bdde42a8..ac72e7ed9fcc 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -409,7 +409,7 @@ static int cxusb_cx22702_frontend_attach(struct dvb_usb_device *d)
409 409
410 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, &b, 1); 410 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, &b, 1);
411 411
412 if ((d->fe = cx22702_attach(&cxusb_cx22702_config, &d->i2c_adap)) != NULL) 412 if ((d->fe = dvb_attach(cx22702_attach, &cxusb_cx22702_config, &d->i2c_adap)) != NULL)
413 return 0; 413 return 0;
414 414
415 return -EIO; 415 return -EIO;
@@ -422,7 +422,7 @@ static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_device *d)
422 422
423 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); 423 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0);
424 424
425 if ((d->fe = lgdt330x_attach(&cxusb_lgdt3303_config, &d->i2c_adap)) != NULL) 425 if ((d->fe = dvb_attach(lgdt330x_attach, &cxusb_lgdt3303_config, &d->i2c_adap)) != NULL)
426 return 0; 426 return 0;
427 427
428 return -EIO; 428 return -EIO;
@@ -435,7 +435,7 @@ static int cxusb_mt352_frontend_attach(struct dvb_usb_device *d)
435 435
436 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); 436 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0);
437 437
438 if ((d->fe = mt352_attach(&cxusb_mt352_config, &d->i2c_adap)) != NULL) 438 if ((d->fe = dvb_attach(mt352_attach, &cxusb_mt352_config, &d->i2c_adap)) != NULL)
439 return 0; 439 return 0;
440 440
441 return -EIO; 441 return -EIO;
@@ -448,8 +448,8 @@ static int cxusb_dee1601_frontend_attach(struct dvb_usb_device *d)
448 448
449 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); 449 cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0);
450 450
451 if (((d->fe = mt352_attach(&cxusb_dee1601_config, &d->i2c_adap)) != NULL) || 451 if (((d->fe = dvb_attach(mt352_attach, &cxusb_dee1601_config, &d->i2c_adap)) != NULL) ||
452 ((d->fe = zl10353_attach(&cxusb_zl10353_dee1601_config, &d->i2c_adap)) != NULL)) 452 ((d->fe = dvb_attach(zl10353_attach, &cxusb_zl10353_dee1601_config, &d->i2c_adap)) != NULL))
453 return 0; 453 return 0;
454 454
455 return -EIO; 455 return -EIO;
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c
index c14d9efb48fd..f5cd3a4f82a8 100644
--- a/drivers/media/dvb/dvb-usb/digitv.c
+++ b/drivers/media/dvb/dvb-usb/digitv.c
@@ -128,11 +128,11 @@ static struct nxt6000_config digitv_nxt6000_config = {
128 128
129static int digitv_frontend_attach(struct dvb_usb_device *d) 129static int digitv_frontend_attach(struct dvb_usb_device *d)
130{ 130{
131 if ((d->fe = mt352_attach(&digitv_mt352_config, &d->i2c_adap)) != NULL) { 131 if ((d->fe = dvb_attach(mt352_attach, &digitv_mt352_config, &d->i2c_adap)) != NULL) {
132 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; 132 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
133 return 0; 133 return 0;
134 } 134 }
135 if ((d->fe = nxt6000_attach(&digitv_nxt6000_config, &d->i2c_adap)) != NULL) { 135 if ((d->fe = dvb_attach(nxt6000_attach, &digitv_nxt6000_config, &d->i2c_adap)) != NULL) {
136 d->fe->ops.tuner_ops.set_params = digitv_nxt6000_tuner_set_params; 136 d->fe->ops.tuner_ops.set_params = digitv_nxt6000_tuner_set_params;
137 return 0; 137 return 0;
138 } 138 }
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
index ec631708c394..f0da15ebe33b 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
@@ -188,8 +188,9 @@ int dvb_usb_fe_init(struct dvb_usb_device* d)
188 188
189 if (dvb_register_frontend(&d->dvb_adap, d->fe)) { 189 if (dvb_register_frontend(&d->dvb_adap, d->fe)) {
190 err("Frontend registration failed."); 190 err("Frontend registration failed.");
191 if (d->fe->ops.release) 191 dvb_detach(d->fe->ops.release_sec, d->fe);
192 d->fe->ops.release(d->fe); 192 dvb_detach(d->fe->ops.tuner_ops.release, d->fe);
193 dvb_detach(d->fe->ops.release, d->fe);
193 d->fe = NULL; 194 d->fe = NULL;
194 return -ENODEV; 195 return -ENODEV;
195 } 196 }
@@ -204,7 +205,11 @@ int dvb_usb_fe_init(struct dvb_usb_device* d)
204 205
205int dvb_usb_fe_exit(struct dvb_usb_device *d) 206int dvb_usb_fe_exit(struct dvb_usb_device *d)
206{ 207{
207 if (d->fe != NULL) 208 if (d->fe != NULL) {
208 dvb_unregister_frontend(d->fe); 209 dvb_unregister_frontend(d->fe);
210 dvb_detach(d->fe->ops.release_sec, d->fe);
211 dvb_detach(d->fe->ops.tuner_ops.release, d->fe);
212 dvb_detach(d->fe->ops.release, d->fe);
213 }
209 return 0; 214 return 0;
210} 215}
diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c
index 97d74da0dad8..418a0b707151 100644
--- a/drivers/media/dvb/dvb-usb/umt-010.c
+++ b/drivers/media/dvb/dvb-usb/umt-010.c
@@ -58,7 +58,7 @@ static int umt_mt352_frontend_attach(struct dvb_usb_device *d)
58 umt_config.demod_init = umt_mt352_demod_init; 58 umt_config.demod_init = umt_mt352_demod_init;
59 umt_config.demod_address = 0xf; 59 umt_config.demod_address = 0xf;
60 60
61 d->fe = mt352_attach(&umt_config, &d->i2c_adap); 61 d->fe = dvb_attach(mt352_attach, &umt_config, &d->i2c_adap);
62 62
63 return 0; 63 return 0;
64} 64}