diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-08-24 12:02:57 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-08-24 12:02:57 +0200 |
commit | ffdca26f9f20d842bcfbffedb07f062534cfd6eb (patch) | |
tree | 42e0bd92b407ed8ce03c402019b70c580e11bb7c /linux/drivers/media | |
parent | 9647bae506c974950241789c800feeb507b42a38 (diff) | |
download | mediapointer-dvb-s2-ffdca26f9f20d842bcfbffedb07f062534cfd6eb.tar.gz mediapointer-dvb-s2-ffdca26f9f20d842bcfbffedb07f062534cfd6eb.tar.bz2 |
gspca: LED and proble changes in sonixb.
From: Hans de Goede <j.w.r.degoede@hhs.nl>
- 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 <j.w.r.degoede@hhs.nl>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/gspca/sonixb.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/linux/drivers/media/video/gspca/sonixb.c b/linux/drivers/media/video/gspca/sonixb.c index 484287f23..1f2ec409f 100644 --- a/linux/drivers/media/video/gspca/sonixb.c +++ b/linux/drivers/media/video/gspca/sonixb.c @@ -789,6 +789,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; @@ -821,15 +826,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; } |