diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-05-14 05:01:31 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 02:00:42 -0300 |
commit | dea74869f3c62b0b7addd67017b22b394e942aac (patch) | |
tree | d1a597caea6615c76f34896cc832fd1371f2e776 /drivers/media/dvb/frontends/lg_h06xf.h | |
parent | 332bed5fc25ab0eb84215ecd89a4acd48219eee0 (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/frontends/lg_h06xf.h')
-rw-r--r-- | drivers/media/dvb/frontends/lg_h06xf.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/dvb/frontends/lg_h06xf.h b/drivers/media/dvb/frontends/lg_h06xf.h index c59fe418052..754d51d1112 100644 --- a/drivers/media/dvb/frontends/lg_h06xf.h +++ b/drivers/media/dvb/frontends/lg_h06xf.h @@ -29,8 +29,8 @@ static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_ada int err; dvb_pll_configure(&dvb_pll_lg_tdvs_h06xf, buf, params->frequency, 0); - 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(i2c_adap, &msg, 1)) != 1) { printk(KERN_WARNING "lg_h06xf: %s error " "(addr %02x <- %02x, err = %i)\n", @@ -47,8 +47,8 @@ static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_ada buf[0] |= 0x18; buf[1] = 0x50; msg.len = 2; - 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(i2c_adap, &msg, 1)) != 1) { printk(KERN_WARNING "lg_h06xf: %s error " "(addr %02x <- %02x, err = %i)\n", |