The patch number 8817 was added via Jean-Francois Moine <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Hans de Goede  <[EMAIL PROTECTED]>
gspca: LED and proble changes in sonixb.


- turn the led of the cam off after plugging in the cam
- move the probe code from open to config, so that if the probe fails
  we never register

Priority: high

Signed-off-by: Hans de Goede <[EMAIL PROTECTED]>
Signed-off-by: Jean-Francois Moine <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/gspca/sonixb.c |   11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff -r c9c0b9612a67 -r 1cf0901f905e linux/drivers/media/video/gspca/sonixb.c
--- a/linux/drivers/media/video/gspca/sonixb.c  Sun Aug 24 11:59:56 2008 +0200
+++ b/linux/drivers/media/video/gspca/sonixb.c  Sun Aug 24 12:02:57 2008 +0200
@@ -789,6 +789,11 @@ static int sd_config(struct gspca_dev *g
        struct sd *sd = (struct sd *) gspca_dev;
        struct cam *cam;
        int sif = 0;
+       const __u8 stop = 0x09; /* Disable stream turn of LED */
+
+       reg_r(gspca_dev, 0x00);
+       if (gspca_dev->usb_buf[0] != 0x10)
+               return -ENODEV;
 
        /* copy the webcam info from the device id */
        sd->sensor = (id->driver_info >> 24) & 0xff;
@@ -821,15 +826,15 @@ static int sd_config(struct gspca_dev *g
                sd->autogain = AUTOGAIN_DEF;
        sd->freq = FREQ_DEF;
 
+       /* Disable stream turn of LED */
+       reg_w(gspca_dev, 0x01, &stop, 1);
+
        return 0;
 }
 
 /* this function is called at open time */
 static int sd_open(struct gspca_dev *gspca_dev)
 {
-       reg_r(gspca_dev, 0x00);
-       if (gspca_dev->usb_buf[0] != 0x10)
-               return -ENODEV;
        return 0;
 }
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/1cf0901f905e177247536f7a2abfa03059052184

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to