summaryrefslogtreecommitdiff
path: root/drivers/media/video
diff options
context:
space:
mode:
authorHans de Goede <j.w.r.degoede@hhs.nl>2008-09-04 00:12:15 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-04 01:37:30 +0400
commit65f33396ab57f3346fb07ddee8e3aa616d13386c (patch)
tree6c06e62359c8fd1fead21d7e3ea380a811541b0f /drivers/media/video
parente2ad2a54ad1e0f8d7c9e49c38b552a630e015af3 (diff)
downloadlinux-65f33396ab57f3346fb07ddee8e3aa616d13386c.tar.xz
V4L/DVB (8817): 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 Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl> Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/gspca/sonixb.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c
index 735d4260f2f8..64aae060a934 100644
--- a/drivers/media/video/gspca/sonixb.c
+++ b/drivers/media/video/gspca/sonixb.c
@@ -756,6 +756,11 @@ static int sd_config(struct gspca_dev *gspca_dev,
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;
@@ -788,15 +793,15 @@ static int sd_config(struct gspca_dev *gspca_dev,
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;
}