aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca
diff options
context:
space:
mode:
authorHans de Goede <j.w.r.degoede@hhs.nl>2008-09-03 16:12:15 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 17:37:30 -0400
commit65f33396ab57f3346fb07ddee8e3aa616d13386c (patch)
tree6c06e62359c8fd1fead21d7e3ea380a811541b0f /drivers/media/video/gspca
parente2ad2a54ad1e0f8d7c9e49c38b552a630e015af3 (diff)
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/gspca')
-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,
756 struct sd *sd = (struct sd *) gspca_dev; 756 struct sd *sd = (struct sd *) gspca_dev;
757 struct cam *cam; 757 struct cam *cam;
758 int sif = 0; 758 int sif = 0;
759 const __u8 stop = 0x09; /* Disable stream turn of LED */
760
761 reg_r(gspca_dev, 0x00);
762 if (gspca_dev->usb_buf[0] != 0x10)
763 return -ENODEV;
759 764
760 /* copy the webcam info from the device id */ 765 /* copy the webcam info from the device id */
761 sd->sensor = (id->driver_info >> 24) & 0xff; 766 sd->sensor = (id->driver_info >> 24) & 0xff;
@@ -788,15 +793,15 @@ static int sd_config(struct gspca_dev *gspca_dev,
788 sd->autogain = AUTOGAIN_DEF; 793 sd->autogain = AUTOGAIN_DEF;
789 sd->freq = FREQ_DEF; 794 sd->freq = FREQ_DEF;
790 795
796 /* Disable stream turn of LED */
797 reg_w(gspca_dev, 0x01, &stop, 1);
798
791 return 0; 799 return 0;
792} 800}
793 801
794/* this function is called at open time */ 802/* this function is called at open time */
795static int sd_open(struct gspca_dev *gspca_dev) 803static int sd_open(struct gspca_dev *gspca_dev)
796{ 804{
797 reg_r(gspca_dev, 0x00);
798 if (gspca_dev->usb_buf[0] != 0x10)
799 return -ENODEV;
800 return 0; 805 return 0;
801} 806}
802 807