diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-07-03 10:09:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:16:41 -0400 |
commit | bf7f0b98426b54c29ec8100a3f1963114c2f2ef0 (patch) | |
tree | c3d43d2240020fded85674066fd2cb7a5a503f86 /drivers/media/video/gspca/tv8532.c | |
parent | 0d2a722ddae5e736a5c36a1b99ee4ca59a8373bc (diff) |
V4L/DVB (8193): gspca: Input buffer may be changed on reg write.
Done for conex, etoms, pac7311, sonixj, t613 and tv8532.
Code cleanup for some other subdrivers.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/tv8532.c')
-rw-r--r-- | drivers/media/video/gspca/tv8532.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/tv8532.c b/drivers/media/video/gspca/tv8532.c index 6218441ba1f0..6da5280b5433 100644 --- a/drivers/media/video/gspca/tv8532.c +++ b/drivers/media/video/gspca/tv8532.c | |||
@@ -192,8 +192,7 @@ static void tv_8532WriteEEprom(struct gspca_dev *gspca_dev) | |||
192 | datacmd = 0xb0;; | 192 | datacmd = 0xb0;; |
193 | reg_w(dev, TV8532_GPIO, &datacmd, 1); | 193 | reg_w(dev, TV8532_GPIO, &datacmd, 1); |
194 | datacmd = TV8532_CMD_EEprom_Open; | 194 | datacmd = TV8532_CMD_EEprom_Open; |
195 | reg_w(dev, TV8532_CTRL, &datacmd, | 195 | reg_w(dev, TV8532_CTRL, &datacmd, 1); |
196 | 1); | ||
197 | /* msleep(1); */ | 196 | /* msleep(1); */ |
198 | while (tv_8532_eeprom_data[i]) { | 197 | while (tv_8532_eeprom_data[i]) { |
199 | reg = (tv_8532_eeprom_data[i] & 0xff000000) >> 24; | 198 | reg = (tv_8532_eeprom_data[i] & 0xff000000) >> 24; |
@@ -390,8 +389,7 @@ static int sd_open(struct gspca_dev *gspca_dev) | |||
390 | tv_8532_setReg(gspca_dev); | 389 | tv_8532_setReg(gspca_dev); |
391 | /*************************************************/ | 390 | /*************************************************/ |
392 | data = 0x0b; | 391 | data = 0x0b; |
393 | reg_w(dev, TV8532_GPIO_OE, &data, | 392 | reg_w(dev, TV8532_GPIO_OE, &data, 1); |
394 | 1); | ||
395 | /*************************************************/ | 393 | /*************************************************/ |
396 | tv_8532_setReg(gspca_dev); | 394 | tv_8532_setReg(gspca_dev); |
397 | /*************************************************/ | 395 | /*************************************************/ |
@@ -417,8 +415,7 @@ static void setbrightness(struct gspca_dev *gspca_dev) | |||
417 | static void sd_start(struct gspca_dev *gspca_dev) | 415 | static void sd_start(struct gspca_dev *gspca_dev) |
418 | { | 416 | { |
419 | struct usb_device *dev = gspca_dev->dev; | 417 | struct usb_device *dev = gspca_dev->dev; |
420 | __u8 data = 0; | 418 | __u8 data; |
421 | __u8 dataStart = 0; | ||
422 | __u8 value[2]; | 419 | __u8 value[2]; |
423 | 420 | ||
424 | data = 0x32; | 421 | data = 0x32; |
@@ -459,8 +456,8 @@ static void sd_start(struct gspca_dev *gspca_dev) | |||
459 | reg_w(dev, TV8532_POINT_L, &data, 1); /* 0x2d */ | 456 | reg_w(dev, TV8532_POINT_L, &data, 1); /* 0x2d */ |
460 | data = TESTPTH; /* 0x04; */ | 457 | data = TESTPTH; /* 0x04; */ |
461 | reg_w(dev, TV8532_POINT_H, &data, 1); /* 0x2e */ | 458 | reg_w(dev, TV8532_POINT_H, &data, 1); /* 0x2e */ |
462 | dataStart = TESTPTBL; /* 0x04; */ | 459 | data = TESTPTBL; /* 0x04; */ |
463 | reg_w(dev, TV8532_POINTB_L, &dataStart, 1); /* 0x2f */ | 460 | reg_w(dev, TV8532_POINTB_L, &data, 1); /* 0x2f */ |
464 | data = TESTPTBH; /* 0x04; */ | 461 | data = TESTPTBH; /* 0x04; */ |
465 | reg_w(dev, TV8532_POINTB_H, &data, 1); /* 0x30 */ | 462 | reg_w(dev, TV8532_POINTB_H, &data, 1); /* 0x30 */ |
466 | data = TV8532_CMD_UPDATE; | 463 | data = TV8532_CMD_UPDATE; |