summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/tv8532.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-03 13:09:12 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-07-03 13:09:12 +0200
commit2dd61caa92b3da1a827cf5c84799ee51bd38d869 (patch)
treee950869c3b771e63b6488dc83e80dd6ed37ecc34 /linux/drivers/media/video/gspca/tv8532.c
parentdd8158c96fe0b10aad55abfaa06aff25f77ee575 (diff)
downloadmediapointer-dvb-s2-2dd61caa92b3da1a827cf5c84799ee51bd38d869.tar.gz
mediapointer-dvb-s2-2dd61caa92b3da1a827cf5c84799ee51bd38d869.tar.bz2
gspca: Input buffer may be changed on reg write.
From: Jean-Francois Moine <moinejf@free.fr> Done for conex, etoms, pac7311, sonixj, t613 and tv8532. Code cleanup for some other subdrivers. Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/tv8532.c')
-rw-r--r--linux/drivers/media/video/gspca/tv8532.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/linux/drivers/media/video/gspca/tv8532.c b/linux/drivers/media/video/gspca/tv8532.c
index 9af2a51bb..ff490c51f 100644
--- a/linux/drivers/media/video/gspca/tv8532.c
+++ b/linux/drivers/media/video/gspca/tv8532.c
@@ -192,8 +192,7 @@ static void tv_8532WriteEEprom(struct gspca_dev *gspca_dev)
datacmd = 0xb0;;
reg_w(dev, TV8532_GPIO, &datacmd, 1);
datacmd = TV8532_CMD_EEprom_Open;
- reg_w(dev, TV8532_CTRL, &datacmd,
- 1);
+ reg_w(dev, TV8532_CTRL, &datacmd, 1);
/* msleep(1); */
while (tv_8532_eeprom_data[i]) {
reg = (tv_8532_eeprom_data[i] & 0xff000000) >> 24;
@@ -390,8 +389,7 @@ static int sd_open(struct gspca_dev *gspca_dev)
tv_8532_setReg(gspca_dev);
/*************************************************/
data = 0x0b;
- reg_w(dev, TV8532_GPIO_OE, &data,
- 1);
+ reg_w(dev, TV8532_GPIO_OE, &data, 1);
/*************************************************/
tv_8532_setReg(gspca_dev);
/*************************************************/
@@ -417,8 +415,7 @@ static void setbrightness(struct gspca_dev *gspca_dev)
static void sd_start(struct gspca_dev *gspca_dev)
{
struct usb_device *dev = gspca_dev->dev;
- __u8 data = 0;
- __u8 dataStart = 0;
+ __u8 data;
__u8 value[2];
data = 0x32;
@@ -459,8 +456,8 @@ static void sd_start(struct gspca_dev *gspca_dev)
reg_w(dev, TV8532_POINT_L, &data, 1); /* 0x2d */
data = TESTPTH; /* 0x04; */
reg_w(dev, TV8532_POINT_H, &data, 1); /* 0x2e */
- dataStart = TESTPTBL; /* 0x04; */
- reg_w(dev, TV8532_POINTB_L, &dataStart, 1); /* 0x2f */
+ data = TESTPTBL; /* 0x04; */
+ reg_w(dev, TV8532_POINTB_L, &data, 1); /* 0x2f */
data = TESTPTBH; /* 0x04; */
reg_w(dev, TV8532_POINTB_H, &data, 1); /* 0x30 */
data = TV8532_CMD_UPDATE;