summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-dvb.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-05-14 10:01:31 +0200
committerPatrick Boettcher <pb@linuxtv.org>2006-05-14 10:01:31 +0200
commitd7e9bdcf5053c838a7421c8e52fed2a0bd4644fb (patch)
tree9e5d14895b19243fdfc53d2344a16d23e0e39586 /linux/drivers/media/video/cx88/cx88-dvb.c
parentb4179ae5b7a6fe509d2cf6ce601880e82c288d5c (diff)
downloadmediapointer-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/video/cx88/cx88-dvb.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-dvb.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c
index a65306c0d..92880edf2 100644
--- a/linux/drivers/media/video/cx88/cx88-dvb.c
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c
@@ -230,8 +230,8 @@ static int philips_fmd1216_pll_init(struct dvb_frontend *fe)
.buf = fmd1216_init, .len = sizeof(fmd1216_init) };
int err;
- if (fe->ops->i2c_gate_ctrl)
- fe->ops->i2c_gate_ctrl(fe, 1);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) {
if (err < 0)
return err;
@@ -261,8 +261,8 @@ static int dntv_live_dvbt_pro_tuner_set_params(struct dvb_frontend* fe,
dvb_pll_configure(dev->core->pll_desc, buf,
params->frequency,
params->u.ofdm.bandwidth);
- if (fe->ops->i2c_gate_ctrl)
- fe->ops->i2c_gate_ctrl(fe, 1);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) {
printk(KERN_WARNING "cx88-dvb: %s error "
@@ -300,8 +300,8 @@ static int dvico_hybrid_tuner_set_params(struct dvb_frontend *fe,
params->frequency,
params->u.ofdm.bandwidth);
- if (fe->ops->i2c_gate_ctrl)
- fe->ops->i2c_gate_ctrl(fe, 1);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) {
printk(KERN_WARNING "cx88-dvb: %s error "
"(addr %02x <- %02x, err = %i)\n",
@@ -375,8 +375,8 @@ static int lgdt3302_tuner_set_params(struct dvb_frontend* fe,
dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
__FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
- if (fe->ops->i2c_gate_ctrl)
- fe->ops->i2c_gate_ctrl(fe, 1);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) {
printk(KERN_WARNING "cx88-dvb: %s error "
"(addr %02x <- %02x, err = %i)\n",
@@ -584,7 +584,7 @@ static int dvb_register(struct cx8802_dev *dev)
dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_pro_config,
&((struct vp3054_i2c_state *)dev->card_priv)->adap);
if (dev->dvb.frontend != NULL) {
- dev->dvb.frontend->ops->tuner_ops.set_params = dntv_live_dvbt_pro_tuner_set_params;
+ dev->dvb.frontend->ops.tuner_ops.set_params = dntv_live_dvbt_pro_tuner_set_params;
}
#else
printk("%s: built without vp3054 support\n", dev->core->name);
@@ -607,7 +607,7 @@ static int dvb_register(struct cx8802_dev *dev)
dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_hybrid,
&dev->core->i2c_adap);
if (dev->dvb.frontend != NULL) {
- dev->dvb.frontend->ops->tuner_ops.set_params = dvico_hybrid_tuner_set_params;
+ dev->dvb.frontend->ops.tuner_ops.set_params = dvico_hybrid_tuner_set_params;
}
break;
#endif
@@ -639,7 +639,7 @@ static int dvb_register(struct cx8802_dev *dev)
dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold,
&dev->core->i2c_adap);
if (dev->dvb.frontend != NULL) {
- dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3302_tuner_set_params;
+ dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params;
}
}
break;
@@ -658,7 +658,7 @@ static int dvb_register(struct cx8802_dev *dev)
dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold,
&dev->core->i2c_adap);
if (dev->dvb.frontend != NULL) {
- dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3302_tuner_set_params;
+ dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params;
}
}
break;
@@ -675,7 +675,7 @@ static int dvb_register(struct cx8802_dev *dev)
dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold,
&dev->core->i2c_adap);
if (dev->dvb.frontend != NULL) {
- dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3303_tuner_set_params;
+ dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params;
}
}
break;
@@ -692,7 +692,7 @@ static int dvb_register(struct cx8802_dev *dev)
dev->dvb.frontend = lgdt330x_attach(&pchdtv_hd5500,
&dev->core->i2c_adap);
if (dev->dvb.frontend != NULL) {
- dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3303_tuner_set_params;
+ dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params;
}
}
break;
@@ -728,8 +728,8 @@ static int dvb_register(struct cx8802_dev *dev)
}
if (dev->core->pll_desc) {
- dev->dvb.frontend->ops->info.frequency_min = dev->core->pll_desc->min;
- dev->dvb.frontend->ops->info.frequency_max = dev->core->pll_desc->max;
+ dev->dvb.frontend->ops.info.frequency_min = dev->core->pll_desc->min;
+ dev->dvb.frontend->ops.info.frequency_max = dev->core->pll_desc->max;
}
/* Put the analog decoder in standby to keep it quiet */