aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/etoms.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/etoms.c')
-rw-r--r--drivers/media/video/gspca/etoms.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/drivers/media/video/gspca/etoms.c b/drivers/media/video/gspca/etoms.c
index 1dbe92d01e6a..4ff0e386914b 100644
--- a/drivers/media/video/gspca/etoms.c
+++ b/drivers/media/video/gspca/etoms.c
@@ -81,6 +81,7 @@ static struct ctrl sd_ctrls[] = {
81 .set = sd_setcontrast, 81 .set = sd_setcontrast,
82 .get = sd_getcontrast, 82 .get = sd_getcontrast,
83 }, 83 },
84#define COLOR_IDX 2
84 { 85 {
85 { 86 {
86 .id = V4L2_CID_SATURATION, 87 .id = V4L2_CID_SATURATION,
@@ -234,7 +235,7 @@ static void reg_r(struct gspca_dev *gspca_dev,
234 struct usb_device *dev = gspca_dev->dev; 235 struct usb_device *dev = gspca_dev->dev;
235 236
236#ifdef GSPCA_DEBUG 237#ifdef GSPCA_DEBUG
237 if (len > sizeof gspca_dev->usb_buf) { 238 if (len > USB_BUF_SZ) {
238 err("reg_r: buffer overflow"); 239 err("reg_r: buffer overflow");
239 return; 240 return;
240 } 241 }
@@ -272,7 +273,7 @@ static void reg_w(struct gspca_dev *gspca_dev,
272 struct usb_device *dev = gspca_dev->dev; 273 struct usb_device *dev = gspca_dev->dev;
273 274
274#ifdef GSPCA_DEBUG 275#ifdef GSPCA_DEBUG
275 if (len > sizeof gspca_dev->usb_buf) { 276 if (len > USB_BUF_SZ) {
276 err("reg_w: buffer overflow"); 277 err("reg_w: buffer overflow");
277 return; 278 return;
278 } 279 }
@@ -665,6 +666,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
665 } else { 666 } else {
666 cam->cam_mode = vga_mode; 667 cam->cam_mode = vga_mode;
667 cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; 668 cam->nmodes = sizeof vga_mode / sizeof vga_mode[0];
669 gspca_dev->ctrl_dis = (1 << COLOR_IDX);
668 } 670 }
669 sd->brightness = BRIGHTNESS_DEF; 671 sd->brightness = BRIGHTNESS_DEF;
670 sd->contrast = CONTRAST_DEF; 672 sd->contrast = CONTRAST_DEF;
@@ -674,8 +676,8 @@ static int sd_config(struct gspca_dev *gspca_dev,
674 return 0; 676 return 0;
675} 677}
676 678
677/* this function is called at open time */ 679/* this function is called at probe and resume time */
678static int sd_open(struct gspca_dev *gspca_dev) 680static int sd_init(struct gspca_dev *gspca_dev)
679{ 681{
680 struct sd *sd = (struct sd *) gspca_dev; 682 struct sd *sd = (struct sd *) gspca_dev;
681 683
@@ -709,14 +711,6 @@ static void sd_stopN(struct gspca_dev *gspca_dev)
709 et_video(gspca_dev, 0); /* video off */ 711 et_video(gspca_dev, 0); /* video off */
710} 712}
711 713
712static void sd_stop0(struct gspca_dev *gspca_dev)
713{
714}
715
716static void sd_close(struct gspca_dev *gspca_dev)
717{
718}
719
720static __u8 Et_getgainG(struct gspca_dev *gspca_dev) 714static __u8 Et_getgainG(struct gspca_dev *gspca_dev)
721{ 715{
722 struct sd *sd = (struct sd *) gspca_dev; 716 struct sd *sd = (struct sd *) gspca_dev;
@@ -893,21 +887,19 @@ static struct sd_desc sd_desc = {
893 .ctrls = sd_ctrls, 887 .ctrls = sd_ctrls,
894 .nctrls = ARRAY_SIZE(sd_ctrls), 888 .nctrls = ARRAY_SIZE(sd_ctrls),
895 .config = sd_config, 889 .config = sd_config,
896 .open = sd_open, 890 .init = sd_init,
897 .start = sd_start, 891 .start = sd_start,
898 .stopN = sd_stopN, 892 .stopN = sd_stopN,
899 .stop0 = sd_stop0,
900 .close = sd_close,
901 .pkt_scan = sd_pkt_scan, 893 .pkt_scan = sd_pkt_scan,
902 .dq_callback = do_autogain, 894 .dq_callback = do_autogain,
903}; 895};
904 896
905/* -- module initialisation -- */ 897/* -- module initialisation -- */
906static __devinitdata struct usb_device_id device_table[] = { 898static __devinitdata struct usb_device_id device_table[] = {
907#ifndef CONFIG_USB_ET61X251
908 {USB_DEVICE(0x102c, 0x6151), .driver_info = SENSOR_PAS106}, 899 {USB_DEVICE(0x102c, 0x6151), .driver_info = SENSOR_PAS106},
909#endif 900#if !defined CONFIG_USB_ET61X251 && !defined CONFIG_USB_ET61X251_MODULE
910 {USB_DEVICE(0x102c, 0x6251), .driver_info = SENSOR_TAS5130CXX}, 901 {USB_DEVICE(0x102c, 0x6251), .driver_info = SENSOR_TAS5130CXX},
902#endif
911 {} 903 {}
912}; 904};
913 905
@@ -926,6 +918,10 @@ static struct usb_driver sd_driver = {
926 .id_table = device_table, 918 .id_table = device_table,
927 .probe = sd_probe, 919 .probe = sd_probe,
928 .disconnect = gspca_disconnect, 920 .disconnect = gspca_disconnect,
921#ifdef CONFIG_PM
922 .suspend = gspca_suspend,
923 .resume = gspca_resume,
924#endif
929}; 925};
930 926
931/* -- module insert / remove -- */ 927/* -- module insert / remove -- */