aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/frontends
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-24 10:03:05 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 05:52:22 -0500
commit249fa0b01c82f497efa15cb98081183e8938985f (patch)
tree74339d23b7581f8a3a00d1586cf632b802fb87cf /drivers/media/dvb/frontends
parent1466194db5f83ade16e3b0bae7e57132d7692ea2 (diff)
[media] dvb: remove dvb_frontend_parameters from calc_regs()
The calc_regs() callback is used by a few frontends (mt352, nxt200x, digitv and zl10353). On all places it is called, the parameters are set by DVBv5 way. So, just use the DVBv5 struct and remove the extra parameter. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/frontends')
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.c6
-rw-r--r--drivers/media/dvb/frontends/mt352.c2
-rw-r--r--drivers/media/dvb/frontends/nxt200x.c2
-rw-r--r--drivers/media/dvb/frontends/zl10353.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c
index c19d6bbc68ce..f967cf9b4a60 100644
--- a/drivers/media/dvb/frontends/dvb-pll.c
+++ b/drivers/media/dvb/frontends/dvb-pll.c
@@ -647,9 +647,9 @@ static int dvb_pll_set_params(struct dvb_frontend *fe,
647} 647}
648 648
649static int dvb_pll_calc_regs(struct dvb_frontend *fe, 649static int dvb_pll_calc_regs(struct dvb_frontend *fe,
650 struct dvb_frontend_parameters *params,
651 u8 *buf, int buf_len) 650 u8 *buf, int buf_len)
652{ 651{
652 struct dtv_frontend_properties *c = &fe->dtv_property_cache;
653 struct dvb_pll_priv *priv = fe->tuner_priv; 653 struct dvb_pll_priv *priv = fe->tuner_priv;
654 int result; 654 int result;
655 u32 frequency = 0; 655 u32 frequency = 0;
@@ -657,7 +657,7 @@ static int dvb_pll_calc_regs(struct dvb_frontend *fe,
657 if (buf_len < 5) 657 if (buf_len < 5)
658 return -EINVAL; 658 return -EINVAL;
659 659
660 result = dvb_pll_configure(fe, buf + 1, params->frequency); 660 result = dvb_pll_configure(fe, buf + 1, c->frequency);
661 if (result < 0) 661 if (result < 0)
662 return result; 662 return result;
663 else 663 else
@@ -666,7 +666,7 @@ static int dvb_pll_calc_regs(struct dvb_frontend *fe,
666 buf[0] = priv->pll_i2c_address; 666 buf[0] = priv->pll_i2c_address;
667 667
668 priv->frequency = frequency; 668 priv->frequency = frequency;
669 priv->bandwidth = (fe->ops.info.type == FE_OFDM) ? params->u.ofdm.bandwidth : 0; 669 priv->bandwidth = c->bandwidth_hz;
670 670
671 return 5; 671 return 5;
672} 672}
diff --git a/drivers/media/dvb/frontends/mt352.c b/drivers/media/dvb/frontends/mt352.c
index 319672f8e1a7..e2a86daba502 100644
--- a/drivers/media/dvb/frontends/mt352.c
+++ b/drivers/media/dvb/frontends/mt352.c
@@ -302,7 +302,7 @@ static int mt352_set_parameters(struct dvb_frontend* fe,
302 _mt352_write(fe, fsm_go, 2); 302 _mt352_write(fe, fsm_go, 2);
303 } else { 303 } else {
304 if (fe->ops.tuner_ops.calc_regs) { 304 if (fe->ops.tuner_ops.calc_regs) {
305 fe->ops.tuner_ops.calc_regs(fe, param, buf+8, 5); 305 fe->ops.tuner_ops.calc_regs(fe, buf+8, 5);
306 buf[8] <<= 1; 306 buf[8] <<= 1;
307 _mt352_write(fe, buf, sizeof(buf)); 307 _mt352_write(fe, buf, sizeof(buf));
308 _mt352_write(fe, tuner_go, 2); 308 _mt352_write(fe, tuner_go, 2);
diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c
index eac20650499f..ae5c3c32f407 100644
--- a/drivers/media/dvb/frontends/nxt200x.c
+++ b/drivers/media/dvb/frontends/nxt200x.c
@@ -566,7 +566,7 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
566 566
567 if (fe->ops.tuner_ops.calc_regs) { 567 if (fe->ops.tuner_ops.calc_regs) {
568 /* get tuning information */ 568 /* get tuning information */
569 fe->ops.tuner_ops.calc_regs(fe, p, buf, 5); 569 fe->ops.tuner_ops.calc_regs(fe, buf, 5);
570 570
571 /* write frequency information */ 571 /* write frequency information */
572 nxt200x_writetuner(state, buf); 572 nxt200x_writetuner(state, buf);
diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c
index adbbf6d3d044..9caccc03d588 100644
--- a/drivers/media/dvb/frontends/zl10353.c
+++ b/drivers/media/dvb/frontends/zl10353.c
@@ -367,7 +367,7 @@ static int zl10353_set_parameters(struct dvb_frontend *fe,
367 fe->ops.i2c_gate_ctrl(fe, 0); 367 fe->ops.i2c_gate_ctrl(fe, 0);
368 } 368 }
369 } else if (fe->ops.tuner_ops.calc_regs) { 369 } else if (fe->ops.tuner_ops.calc_regs) {
370 fe->ops.tuner_ops.calc_regs(fe, param, pllbuf + 1, 5); 370 fe->ops.tuner_ops.calc_regs(fe, pllbuf + 1, 5);
371 pllbuf[1] <<= 1; 371 pllbuf[1] <<= 1;
372 zl10353_write(fe, pllbuf, sizeof(pllbuf)); 372 zl10353_write(fe, pllbuf, sizeof(pllbuf));
373 } 373 }