aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/mantis/mantis_vp2040.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2011-12-23 05:18:04 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-12-31 05:38:06 -0500
commit31cbc53fe56497f39e697a904f770cff096ae765 (patch)
tree829b98dab1e421912ce779541bedf08fcbfaaab6 /drivers/media/dvb/mantis/mantis_vp2040.c
parentf0b6c2a90f5c075ea9f5b069418bb995acb1b363 (diff)
[media] mantis_vp2040: use DVBv5 parameters on set_params()
Instead of using DVBv3 parameters, rely on DVBv5 parameters to set the tuner Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/mantis/mantis_vp2040.c')
-rw-r--r--drivers/media/dvb/mantis/mantis_vp2040.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/dvb/mantis/mantis_vp2040.c b/drivers/media/dvb/mantis/mantis_vp2040.c
index f72b137b7652..beadfea4f0c8 100644
--- a/drivers/media/dvb/mantis/mantis_vp2040.c
+++ b/drivers/media/dvb/mantis/mantis_vp2040.c
@@ -49,6 +49,7 @@ struct tda10023_config vp2040_tda10023_cu1216_config = {
49 49
50static int tda1002x_cu1216_tuner_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params) 50static int tda1002x_cu1216_tuner_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *params)
51{ 51{
52 struct dtv_frontend_properties *p = &fe->dtv_property_cache;
52 struct mantis_pci *mantis = fe->dvb->priv; 53 struct mantis_pci *mantis = fe->dvb->priv;
53 struct i2c_adapter *adapter = &mantis->adapter; 54 struct i2c_adapter *adapter = &mantis->adapter;
54 55
@@ -59,13 +60,13 @@ static int tda1002x_cu1216_tuner_set(struct dvb_frontend *fe, struct dvb_fronten
59#define CU1216_IF 36125000 60#define CU1216_IF 36125000
60#define TUNER_MUL 62500 61#define TUNER_MUL 62500
61 62
62 u32 div = (params->frequency + CU1216_IF + TUNER_MUL / 2) / TUNER_MUL; 63 u32 div = (p->frequency + CU1216_IF + TUNER_MUL / 2) / TUNER_MUL;
63 64
64 buf[0] = (div >> 8) & 0x7f; 65 buf[0] = (div >> 8) & 0x7f;
65 buf[1] = div & 0xff; 66 buf[1] = div & 0xff;
66 buf[2] = 0xce; 67 buf[2] = 0xce;
67 buf[3] = (params->frequency < 150000000 ? 0x01 : 68 buf[3] = (p->frequency < 150000000 ? 0x01 :
68 params->frequency < 445000000 ? 0x02 : 0x04); 69 p->frequency < 445000000 ? 0x02 : 0x04);
69 buf[4] = 0xde; 70 buf[4] = 0xde;
70 buf[5] = 0x20; 71 buf[5] = 0x20;
71 72