diff options
Diffstat (limited to 'drivers/media/video/gspca/spca561.c')
-rw-r--r-- | drivers/media/video/gspca/spca561.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index cfbc9ebc5c5d..020a03c466c1 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c | |||
@@ -152,7 +152,7 @@ static void reg_w_val(struct usb_device *dev, __u16 index, __u8 value) | |||
152 | 152 | ||
153 | ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), | 153 | ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), |
154 | 0, /* request */ | 154 | 0, /* request */ |
155 | USB_TYPE_VENDOR | USB_RECIP_DEVICE, | 155 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
156 | value, index, NULL, 0, 500); | 156 | value, index, NULL, 0, 500); |
157 | PDEBUG(D_USBO, "reg write: 0x%02x:0x%02x", index, value); | 157 | PDEBUG(D_USBO, "reg write: 0x%02x:0x%02x", index, value); |
158 | if (ret < 0) | 158 | if (ret < 0) |
@@ -225,7 +225,7 @@ static int i2c_read(struct gspca_dev *gspca_dev, __u16 reg, __u8 mode) | |||
225 | reg_w_val(gspca_dev->dev, 0x8802, (mode | 0x01)); | 225 | reg_w_val(gspca_dev->dev, 0x8802, (mode | 0x01)); |
226 | do { | 226 | do { |
227 | reg_r(gspca_dev, 0x8803, 1); | 227 | reg_r(gspca_dev, 0x8803, 1); |
228 | if (!gspca_dev->usb_buf) | 228 | if (!gspca_dev->usb_buf[0]) |
229 | break; | 229 | break; |
230 | } while (--retry); | 230 | } while (--retry); |
231 | if (retry == 0) | 231 | if (retry == 0) |
@@ -699,7 +699,7 @@ static void setautogain(struct gspca_dev *gspca_dev) | |||
699 | sd->ag_cnt = -1; | 699 | sd->ag_cnt = -1; |
700 | } | 700 | } |
701 | 701 | ||
702 | static void sd_start_12a(struct gspca_dev *gspca_dev) | 702 | static int sd_start_12a(struct gspca_dev *gspca_dev) |
703 | { | 703 | { |
704 | struct usb_device *dev = gspca_dev->dev; | 704 | struct usb_device *dev = gspca_dev->dev; |
705 | int Clck = 0x8a; /* lower 0x8X values lead to fps > 30 */ | 705 | int Clck = 0x8a; /* lower 0x8X values lead to fps > 30 */ |
@@ -725,8 +725,9 @@ static void sd_start_12a(struct gspca_dev *gspca_dev) | |||
725 | setwhite(gspca_dev); | 725 | setwhite(gspca_dev); |
726 | setautogain(gspca_dev); | 726 | setautogain(gspca_dev); |
727 | setexposure(gspca_dev); | 727 | setexposure(gspca_dev); |
728 | return 0; | ||
728 | } | 729 | } |
729 | static void sd_start_72a(struct gspca_dev *gspca_dev) | 730 | static int sd_start_72a(struct gspca_dev *gspca_dev) |
730 | { | 731 | { |
731 | struct usb_device *dev = gspca_dev->dev; | 732 | struct usb_device *dev = gspca_dev->dev; |
732 | int Clck; | 733 | int Clck; |
@@ -750,6 +751,7 @@ static void sd_start_72a(struct gspca_dev *gspca_dev) | |||
750 | reg_w_val(dev, 0x8700, Clck); /* 0x27 clock */ | 751 | reg_w_val(dev, 0x8700, Clck); /* 0x27 clock */ |
751 | reg_w_val(dev, 0x8112, 0x10 | 0x20); | 752 | reg_w_val(dev, 0x8112, 0x10 | 0x20); |
752 | setautogain(gspca_dev); | 753 | setautogain(gspca_dev); |
754 | return 0; | ||
753 | } | 755 | } |
754 | 756 | ||
755 | static void sd_stopN(struct gspca_dev *gspca_dev) | 757 | static void sd_stopN(struct gspca_dev *gspca_dev) |
@@ -1064,7 +1066,7 @@ static struct ctrl sd_ctrls_12a[] = { | |||
1064 | { | 1066 | { |
1065 | .id = V4L2_CID_DO_WHITE_BALANCE, | 1067 | .id = V4L2_CID_DO_WHITE_BALANCE, |
1066 | .type = V4L2_CTRL_TYPE_INTEGER, | 1068 | .type = V4L2_CTRL_TYPE_INTEGER, |
1067 | .name = "While Balance", | 1069 | .name = "White Balance", |
1068 | .minimum = WHITE_MIN, | 1070 | .minimum = WHITE_MIN, |
1069 | .maximum = WHITE_MAX, | 1071 | .maximum = WHITE_MAX, |
1070 | .step = 1, | 1072 | .step = 1, |