aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/pluto2
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/pluto2
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/pluto2')
-rw-r--r--drivers/media/dvb/pluto2/pluto2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c
index 5cc609d986d4..acabea0793b6 100644
--- a/drivers/media/dvb/pluto2/pluto2.c
+++ b/drivers/media/dvb/pluto2/pluto2.c
@@ -473,8 +473,8 @@ static int lg_tdtpe001p_tuner_set_params(struct dvb_frontend *fe,
473 msg.buf = buf; 473 msg.buf = buf;
474 msg.len = sizeof(buf); 474 msg.len = sizeof(buf);
475 475
476 if (fe->ops->i2c_gate_ctrl) 476 if (fe->ops.i2c_gate_ctrl)
477 fe->ops->i2c_gate_ctrl(fe, 1); 477 fe->ops.i2c_gate_ctrl(fe, 1);
478 ret = i2c_transfer(&pluto->i2c_adap, &msg, 1); 478 ret = i2c_transfer(&pluto->i2c_adap, &msg, 1);
479 if (ret < 0) 479 if (ret < 0)
480 return ret; 480 return ret;
@@ -511,12 +511,12 @@ static int __devinit frontend_init(struct pluto *pluto)
511 dev_err(&pluto->pdev->dev, "could not attach frontend\n"); 511 dev_err(&pluto->pdev->dev, "could not attach frontend\n");
512 return -ENODEV; 512 return -ENODEV;
513 } 513 }
514 pluto->fe->ops->tuner_ops.set_params = lg_tdtpe001p_tuner_set_params; 514 pluto->fe->ops.tuner_ops.set_params = lg_tdtpe001p_tuner_set_params;
515 515
516 ret = dvb_register_frontend(&pluto->dvb_adapter, pluto->fe); 516 ret = dvb_register_frontend(&pluto->dvb_adapter, pluto->fe);
517 if (ret < 0) { 517 if (ret < 0) {
518 if (pluto->fe->ops->release) 518 if (pluto->fe->ops.release)
519 pluto->fe->ops->release(pluto->fe); 519 pluto->fe->ops.release(pluto->fe);
520 return ret; 520 return ret;
521 } 521 }
522 522