lists.zerezo.com
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
PATCH: gspca-sonixb-led-off.patch
- Date: Sun, 24 Aug 2008 11:46:57 +0200
- From: Hans de Goede <j.w.r.degoede@xxxxxx>
- Subject: PATCH: gspca-sonixb-led-off.patch
Hi,
* 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
Signed-off-by: Hans de Goede <j.w.r.degoede@xxxxxx>
Regards,
Hans
* 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
Signed-off-by: Hans de Goede <j.w.r.degoede@xxxxxx>
diff -r a392efb75b57 linux/drivers/media/video/gspca/sonixb.c
--- a/linux/drivers/media/video/gspca/sonixb.c Sun Aug 24 11:37:43 2008 +0200
+++ b/linux/drivers/media/video/gspca/sonixb.c Sun Aug 24 11:40:27 2008 +0200
@@ -789,6 +789,11 @@
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 @@
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;
}
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list