summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPete Eberlein <pete@sensoray.com>2010-01-13 19:15:48 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 15:10:45 -0300
commit986ce4510b37ba684aaebd3eb0e6ee0c03906ed8 (patch)
treea0740c45b51ccfe64c4a70618bb56d0fe46fc448
parent94b12d9ea555851632deee1c2b06c4f281a45e12 (diff)
downloadop-kernel-dev-986ce4510b37ba684aaebd3eb0e6ee0c03906ed8.zip
op-kernel-dev-986ce4510b37ba684aaebd3eb0e6ee0c03906ed8.tar.gz
V4L/DVB: s2250: Fix write_reg i2c address
The kernel i2c model uses right-aligned 7-bit i2c addresses, but the 2250 firmware uses an 8-bit address in the usb vendor request. A previous patch by Jean Delvare shifted the i2c addresses 1 bit to the right, and this patch fixes the write_reg function to shift it back before sending the vendor request. To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Signed-off-by: Pete Eberlein <pete@sensoray.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/staging/go7007/s2250-board.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/go7007/s2250-board.c b/drivers/staging/go7007/s2250-board.c
index 8cf7f27..c324f6e 100644
--- a/drivers/staging/go7007/s2250-board.c
+++ b/drivers/staging/go7007/s2250-board.c
@@ -159,7 +159,7 @@ static int write_reg(struct i2c_client *client, u8 reg, u8 value)
struct go7007 *go = i2c_get_adapdata(client->adapter);
struct go7007_usb *usb;
int rc;
- int dev_addr = client->addr;
+ int dev_addr = client->addr << 1; /* firmware wants 8-bit address */
u8 *buf;
if (go == NULL)
OpenPOWER on IntegriCloud