From ff8138511038450f4fd212669615835c98822d17 Mon Sep 17 00:00:00 2001 From: Jean-Francois Moine Date: Mon, 17 Nov 2008 18:56:41 +0100 Subject: gspca: Don't return the control values from the webcams in spca501. From: Hans de Goede The bridge takes some time to update after a write, so apps doing a quick write/read can get the old value back. Priority: normal Signed-off-by: Hans de Goede Signed-off-by: Jean-Francois Moine --- linux/drivers/media/video/gspca/spca501.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/video/gspca') diff --git a/linux/drivers/media/video/gspca/spca501.c b/linux/drivers/media/video/gspca/spca501.c index 3af5f9d60..29277bdda 100644 --- a/linux/drivers/media/video/gspca/spca501.c +++ b/linux/drivers/media/video/gspca/spca501.c @@ -1822,6 +1822,7 @@ static int reg_write(struct usb_device *dev, return ret; } +#if 0 /* returns: negative is error, pos or zero is data */ static int reg_read(struct gspca_dev *gspca_dev, __u16 req, /* bRequest */ @@ -1845,6 +1846,7 @@ static int reg_read(struct gspca_dev *gspca_dev, } return (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0]; } +#endif static int write_vector(struct gspca_dev *gspca_dev, const __u16 data[][3]) @@ -1876,11 +1878,13 @@ static void setbrightness(struct gspca_dev *gspca_dev) static void getbrightness(struct gspca_dev *gspca_dev) { +#if 0 struct sd *sd = (struct sd *) gspca_dev; __u16 brightness; brightness = reg_read(gspca_dev, SPCA501_REG_CCDSP, 0x11, 2); - sd->brightness = brightness << 1; + sd->brightness = brightness; +#endif } static void setcontrast(struct gspca_dev *gspca_dev) @@ -1906,7 +1910,6 @@ static void getcontrast(struct gspca_dev *gspca_dev) 0x01, 1) & 0xff); #endif -/* spca50x->contrast = 0xaa01; */ } static void setcolors(struct gspca_dev *gspca_dev) @@ -1918,11 +1921,13 @@ static void setcolors(struct gspca_dev *gspca_dev) static void getcolors(struct gspca_dev *gspca_dev) { +#if 0 struct sd *sd = (struct sd *) gspca_dev; sd->colors = reg_read(gspca_dev, SPCA501_REG_CCDSP, 0x0c, 2); /* sd->hue = (reg_read(gspca_dev, SPCA501_REG_CCDSP, 0x13, */ /* 2) & 0xFF) << 8; */ +#endif } /* this function is called at probe time */ -- cgit v1.2.3