diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-05-14 10:01:31 +0200 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-05-14 10:01:31 +0200 |
commit | d7e9bdcf5053c838a7421c8e52fed2a0bd4644fb (patch) | |
tree | 9e5d14895b19243fdfc53d2344a16d23e0e39586 /linux/drivers/media/dvb/dvb-usb/cxusb.c | |
parent | b4179ae5b7a6fe509d2cf6ce601880e82c288d5c (diff) | |
download | mediapointer-dvb-s2-d7e9bdcf5053c838a7421c8e52fed2a0bd4644fb.tar.gz mediapointer-dvb-s2-d7e9bdcf5053c838a7421c8e52fed2a0bd4644fb.tar.bz2 |
Change dvb_frontend_ops to be a real field instead of a pointer field inside dvb_frontend
From: Patrick Boettcher <pb@linuxtv.org>
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>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/cxusb.c')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/cxusb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c index f20925579..9004f1dfc 100644 --- a/linux/drivers/media/dvb/dvb-usb/cxusb.c +++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c @@ -360,8 +360,8 @@ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d) memcpy(d->pll_init, bpll, 4); d->pll_desc = &dvb_pll_fmd1216me; - d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c; - d->fe->ops->tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; + d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c; + d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; return 0; } @@ -370,7 +370,7 @@ static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d) { d->pll_addr = 0x61; d->pll_desc = &dvb_pll_thomson_dtt7579; - d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; + d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } @@ -378,7 +378,7 @@ static int cxusb_lgz201_tuner_attach(struct dvb_usb_device *d) { d->pll_addr = 0x61; d->pll_desc = &dvb_pll_lg_z201; - d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; + d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } @@ -386,13 +386,13 @@ static int cxusb_dtt7579_tuner_attach(struct dvb_usb_device *d) { d->pll_addr = 0x60; d->pll_desc = &dvb_pll_thomson_dtt7579; - d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; + d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; return 0; } static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_device *d) { - d->fe->ops->tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; + d->fe->ops.tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; return 0; } |