diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-04 14:51:50 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-04 14:51:50 -0300 |
commit | 88778479f1fa5916aa079b9c17929716ebc182a6 (patch) | |
tree | 8960ed0705c81262a8b534cf182c6b56d07bb6b4 /linux/drivers/media/dvb/frontends/s5h1420.c | |
parent | 5fa51c4127709c7bcbcbbc6e14b4780908e36990 (diff) | |
parent | edd1d19fe9c951f51b87b6a614f3e5abc2a6c12e (diff) | |
download | mediapointer-dvb-s2-88778479f1fa5916aa079b9c17929716ebc182a6.tar.gz mediapointer-dvb-s2-88778479f1fa5916aa079b9c17929716ebc182a6.tar.bz2 |
merge: http://linuxtv.org/hg/~tmerle/cinergyT2
From: Mauro Carvalho Chehab <mchehab@redhat.com>
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/dvb/frontends/s5h1420.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/s5h1420.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/linux/drivers/media/dvb/frontends/s5h1420.c b/linux/drivers/media/dvb/frontends/s5h1420.c index b768da972..46d55e393 100644 --- a/linux/drivers/media/dvb/frontends/s5h1420.c +++ b/linux/drivers/media/dvb/frontends/s5h1420.c @@ -59,7 +59,7 @@ struct s5h1420_state { * it does not support repeated-start, workaround: write addr-1 * and then read */ - u8 shadow[255]; + u8 shadow[256]; }; static u32 s5h1420_getsymbolrate(struct s5h1420_state* state); @@ -94,8 +94,11 @@ static u8 s5h1420_readreg(struct s5h1420_state *state, u8 reg) if (ret != 3) return ret; } else { - ret = i2c_transfer(state->i2c, &msg[1], 2); - if (ret != 2) + ret = i2c_transfer(state->i2c, &msg[1], 1); + if (ret != 1) + return ret; + ret = i2c_transfer(state->i2c, &msg[2], 1); + if (ret != 1) return ret; } @@ -854,7 +857,7 @@ static int s5h1420_init (struct dvb_frontend* fe) struct s5h1420_state* state = fe->demodulator_priv; /* disable power down and do reset */ - state->CON_1_val = 0x10; + state->CON_1_val = state->config->serial_mpeg << 4; s5h1420_writereg(state, 0x02, state->CON_1_val); msleep(10); s5h1420_reset(state); |