summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/usbvision
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2007-04-15 06:09:56 -0700
committerTrent Piepho <xyzzy@speakeasy.org>2007-04-15 06:09:56 -0700
commit43d55e928f7b7bc1f2195f7b9997529c7864fb95 (patch)
treedd0a275fc27a4685a3c3fe62727566a70545b7e0 /linux/drivers/media/video/usbvision
parent21955a75cef601c1ec9a95b53d223a27e75e4a4c (diff)
downloadmediapointer-dvb-s2-43d55e928f7b7bc1f2195f7b9997529c7864fb95.tar.gz
mediapointer-dvb-s2-43d55e928f7b7bc1f2195f7b9997529c7864fb95.tar.bz2
usbvision: fix confusion over 7-bit vs 8-bit TDDA9887 addresses
From: Trent Piepho <xyzzy@speakeasy.org> The code was testing an 8-bit address against a 7-bit address. Will the confusion of the two never cease? Biggest flaw of the I2C protocol: the R/W bit is the LSB instead of the MSB. No one can ever agree if addresses are 7-bits and the R/W bit follows them, or if they are 8-bit and the R/W bit is OR-ed into the address byte. If the R/W bit was first, it wouldn't make any difference! Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Diffstat (limited to 'linux/drivers/media/video/usbvision')
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-i2c.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c
index 2b7ee0bec..a0eed8633 100644
--- a/linux/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c
@@ -299,9 +299,10 @@ static int attach_inform(struct i2c_client *client)
usbvision = i2c_get_adapdata(client->adapter);
switch (client->addr << 1) {
- case 0x86:
- case 0x43:
- case 0x4b:
+ case 0x42 << 1:
+ case 0x43 << 1:
+ case 0x4a << 1:
+ case 0x4b << 1:
{
struct tuner_setup tun_setup;