aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/cxusb.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-05-14 04:01:31 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 01:00:42 -0400
commitdea74869f3c62b0b7addd67017b22b394e942aac (patch)
treed1a597caea6615c76f34896cc832fd1371f2e776 /drivers/media/dvb/dvb-usb/cxusb.c
parent332bed5fc25ab0eb84215ecd89a4acd48219eee0 (diff)
V4L/DVB (4028): Change dvb_frontend_ops to be a real field instead of a pointer field inside dvb_frontend
The dvb_frontend_ops is a pointer inside dvb_frontend. That's why every demod-driver is having a field of dvb_frontend_ops in its private-state-struct and using the reference for filling the pointer-field in dvb_frontend. - It saves at least two lines of code per demod-driver, - reduces object size (one less dereference per frontend_ops-access), - be coherent with dvb_tuner_ops, - makes it a little bit easier for newbies to understand how it works and - avoids stupid mistakes because you would have to copy the dvb_frontend_ops always, before you could assign the static pointer directly, which was dangerous. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/cxusb.c')
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index 500785e41e2..d0063ae120b 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -360,8 +360,8 @@ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d)
360 memcpy(d->pll_init, bpll, 4); 360 memcpy(d->pll_init, bpll, 4);
361 d->pll_desc = &dvb_pll_fmd1216me; 361 d->pll_desc = &dvb_pll_fmd1216me;
362 362
363 d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c; 363 d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c;
364 d->fe->ops->tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; 364 d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c;
365 365
366 return 0; 366 return 0;
367} 367}
@@ -370,7 +370,7 @@ static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d)
370{ 370{
371 d->pll_addr = 0x61; 371 d->pll_addr = 0x61;
372 d->pll_desc = &dvb_pll_thomson_dtt7579; 372 d->pll_desc = &dvb_pll_thomson_dtt7579;
373 d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; 373 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
374 return 0; 374 return 0;
375} 375}
376 376
@@ -378,7 +378,7 @@ static int cxusb_lgz201_tuner_attach(struct dvb_usb_device *d)
378{ 378{
379 d->pll_addr = 0x61; 379 d->pll_addr = 0x61;
380 d->pll_desc = &dvb_pll_lg_z201; 380 d->pll_desc = &dvb_pll_lg_z201;
381 d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; 381 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
382 return 0; 382 return 0;
383} 383}
384 384
@@ -386,13 +386,13 @@ static int cxusb_dtt7579_tuner_attach(struct dvb_usb_device *d)
386{ 386{
387 d->pll_addr = 0x60; 387 d->pll_addr = 0x60;
388 d->pll_desc = &dvb_pll_thomson_dtt7579; 388 d->pll_desc = &dvb_pll_thomson_dtt7579;
389 d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; 389 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
390 return 0; 390 return 0;
391} 391}
392 392
393static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_device *d) 393static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_device *d)
394{ 394{
395 d->fe->ops->tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; 395 d->fe->ops.tuner_ops.set_params = cxusb_lgh064f_tuner_set_params;
396 return 0; 396 return 0;
397} 397}
398 398