]> git.baikalelectronics.ru Git - kernel.git/commit
[media] af9015: Fix max I2C message size when used with tda18271
authorMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Oct 2010 16:55:34 +0000 (14:55 -0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 27 Oct 2010 17:02:35 +0000 (15:02 -0200)
commita37f87eb97258dfdeed98978ed1adfcdb8daf39d
treee0f131575f723f77be29b04e3fc634db296460f6
parenteeba30f846578926ff5f94e51bb36565e6cf8448
[media] af9015: Fix max I2C message size when used with tda18271

Changeset 1445143ade4d3c0de4aec82a57ea115ec636d168 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 (15c8fafd111fbdedb0ea6751640a3e13ec93a32c) 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>
drivers/media/common/tuners/tda18271-common.c
drivers/media/dvb/dvb-usb/af9015.c