diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-27 12:55:34 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-27 13:02:35 -0400 |
commit | 7655e594945289b418af39f6669fea4666a7b520 (patch) | |
tree | e0f131575f723f77be29b04e3fc634db296460f6 /drivers/media | |
parent | dc69798447173a6b711fe36b714892dd2e880297 (diff) |
[media] af9015: Fix max I2C message size when used with tda18271
Changeset 1724c8fa7eb33d68898e060a08a8e6a88348b62f added an option to change
the maximum I2C size to 8 bytes. However, it forgot to replace the previous
usage at af9015 to use the newly defined macro value
(TDA18271_16_BYTE_CHUNK_INIT).
A latter changeset (e350d44fed8eb86a7192a579e3687fcd76a4645b) extended the
possible values for .small_i2c field and, instead of using a random sequence
of numbers, it used a number that makes more sense (e. g. the actual limit,
in terms of bytes).
However, as af9015 were using .small_i2c = 1, this become undefined, and the
restriction of a max size of 16 was gone.
While here, fix the reported msg size at tda18271-common.c.
Reported-by: Jiri Slaby <jirislaby@gmail.com>
Tested-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/common/tuners/tda18271-common.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/af9015.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/common/tuners/tda18271-common.c b/drivers/media/common/tuners/tda18271-common.c index 195b30e3872d..5466d47db899 100644 --- a/drivers/media/common/tuners/tda18271-common.c +++ b/drivers/media/common/tuners/tda18271-common.c | |||
@@ -237,7 +237,7 @@ int tda18271_write_regs(struct dvb_frontend *fe, int idx, int len) | |||
237 | 237 | ||
238 | if (ret != 1) | 238 | if (ret != 1) |
239 | tda_err("ERROR: idx = 0x%x, len = %d, " | 239 | tda_err("ERROR: idx = 0x%x, len = %d, " |
240 | "i2c_transfer returned: %d\n", idx, len, ret); | 240 | "i2c_transfer returned: %d\n", idx, max, ret); |
241 | 241 | ||
242 | return (ret == 1 ? 0 : ret); | 242 | return (ret == 1 ? 0 : ret); |
243 | } | 243 | } |
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index 3ef19a83418c..31c0a0ed39f5 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
@@ -1131,7 +1131,7 @@ static struct qt1010_config af9015_qt1010_config = { | |||
1131 | 1131 | ||
1132 | static struct tda18271_config af9015_tda18271_config = { | 1132 | static struct tda18271_config af9015_tda18271_config = { |
1133 | .gate = TDA18271_GATE_DIGITAL, | 1133 | .gate = TDA18271_GATE_DIGITAL, |
1134 | .small_i2c = 1, | 1134 | .small_i2c = TDA18271_16_BYTE_CHUNK_INIT, |
1135 | }; | 1135 | }; |
1136 | 1136 | ||
1137 | static struct mxl5005s_config af9015_mxl5003_config = { | 1137 | static struct mxl5005s_config af9015_mxl5003_config = { |