aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/spca500.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-25 07:53:03 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 10:06:38 -0400
commit9d64fdb15b1b9ce9144cfde4001e9194ccde42d1 (patch)
treeda578050af9867c0247b55099b4e7337f8fea2b4 /drivers/media/video/gspca/spca500.c
parent07767ebda385956bd2b193f9820de719475bfe6e (diff)
V4L/DVB (8513): gspca: Set the specific per webcam information in driver_info.
This patch removes a big part of the code run at probe time. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/spca500.c')
-rw-r--r--drivers/media/video/gspca/spca500.c133
1 files changed, 17 insertions, 116 deletions
diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/video/gspca/spca500.c
index 2b8ae8095b0e..66cf2b684b7c 100644
--- a/drivers/media/video/gspca/spca500.c
+++ b/drivers/media/video/gspca/spca500.c
@@ -627,108 +627,10 @@ static int sd_config(struct gspca_dev *gspca_dev,
627{ 627{
628 struct sd *sd = (struct sd *) gspca_dev; 628 struct sd *sd = (struct sd *) gspca_dev;
629 struct cam *cam; 629 struct cam *cam;
630 __u16 vendor; 630
631 __u16 product;
632
633 vendor = id->idVendor;
634 product = id->idProduct;
635 switch (vendor) {
636 case 0x040a: /* Kodak cameras */
637/* switch (product) { */
638/* case 0x0300: */
639 sd->subtype = KodakEZ200;
640/* break; */
641/* } */
642 break;
643 case 0x041e: /* Creative cameras */
644/* switch (product) { */
645/* case 0x400a: */
646 sd->subtype = CreativePCCam300;
647/* break; */
648/* } */
649 break;
650 case 0x046d: /* Logitech Labtec */
651 switch (product) {
652 case 0x0890:
653 sd->subtype = LogitechTraveler;
654 break;
655 case 0x0900:
656 sd->subtype = LogitechClickSmart310;
657 break;
658 case 0x0901:
659 sd->subtype = LogitechClickSmart510;
660 break;
661 }
662 break;
663 case 0x04a5: /* Benq */
664/* switch (product) { */
665/* case 0x300c: */
666 sd->subtype = BenqDC1016;
667/* break; */
668/* } */
669 break;
670 case 0x04fc: /* SunPlus */
671/* switch (product) { */
672/* case 0x7333: */
673 sd->subtype = PalmPixDC85;
674/* break; */
675/* } */
676 break;
677 case 0x055f: /* Mustek cameras */
678 switch (product) {
679 case 0xc200:
680 sd->subtype = MustekGsmart300;
681 break;
682 case 0xc220:
683 sd->subtype = Gsmartmini;
684 break;
685 }
686 break;
687 case 0x06bd: /* Agfa Cl20 */
688/* switch (product) { */
689/* case 0x0404: */
690 sd->subtype = AgfaCl20;
691/* break; */
692/* } */
693 break;
694 case 0x06be: /* Optimedia */
695/* switch (product) { */
696/* case 0x0800: */
697 sd->subtype = Optimedia;
698/* break; */
699/* } */
700 break;
701 case 0x084d: /* D-Link / Minton */
702/* switch (product) { */
703/* case 0x0003: * DSC-350 / S-Cam F5 */
704 sd->subtype = DLinkDSC350;
705/* break; */
706/* } */
707 break;
708 case 0x08ca: /* Aiptek */
709/* switch (product) { */
710/* case 0x0103: */
711 sd->subtype = AiptekPocketDV;
712/* break; */
713/* } */
714 break;
715 case 0x2899: /* ToptroIndustrial */
716/* switch (product) { */
717/* case 0x012c: */
718 sd->subtype = ToptroIndus;
719/* break; */
720/* } */
721 break;
722 case 0x8086: /* Intel */
723/* switch (product) { */
724/* case 0x0630: * Pocket PC Camera */
725 sd->subtype = IntelPocketPCCamera;
726/* break; */
727/* } */
728 break;
729 }
730 cam = &gspca_dev->cam; 631 cam = &gspca_dev->cam;
731 cam->epaddr = 0x01; 632 cam->epaddr = 0x01;
633 sd->subtype = id->driver_info;
732 if (sd->subtype != LogitechClickSmart310) { 634 if (sd->subtype != LogitechClickSmart310) {
733 cam->cam_mode = vga_mode; 635 cam->cam_mode = vga_mode;
734 cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; 636 cam->nmodes = sizeof vga_mode / sizeof vga_mode[0];
@@ -1158,23 +1060,22 @@ static struct sd_desc sd_desc = {
1158}; 1060};
1159 1061
1160/* -- module initialisation -- */ 1062/* -- module initialisation -- */
1161#define DVNM(name) .driver_info = (kernel_ulong_t) name
1162static const __devinitdata struct usb_device_id device_table[] = { 1063static const __devinitdata struct usb_device_id device_table[] = {
1163 {USB_DEVICE(0x040a, 0x0300), DVNM("Kodak EZ200")}, 1064 {USB_DEVICE(0x040a, 0x0300), KodakEZ200},
1164 {USB_DEVICE(0x041e, 0x400a), DVNM("Creative PC-CAM 300")}, 1065 {USB_DEVICE(0x041e, 0x400a), CreativePCCam300},
1165 {USB_DEVICE(0x046d, 0x0890), DVNM("Logitech QuickCam traveler")}, 1066 {USB_DEVICE(0x046d, 0x0890), LogitechTraveler},
1166 {USB_DEVICE(0x046d, 0x0900), DVNM("Logitech Inc. ClickSmart 310")}, 1067 {USB_DEVICE(0x046d, 0x0900), LogitechClickSmart310},
1167 {USB_DEVICE(0x046d, 0x0901), DVNM("Logitech Inc. ClickSmart 510")}, 1068 {USB_DEVICE(0x046d, 0x0901), LogitechClickSmart510},
1168 {USB_DEVICE(0x04a5, 0x300c), DVNM("Benq DC1016")}, 1069 {USB_DEVICE(0x04a5, 0x300c), BenqDC1016},
1169 {USB_DEVICE(0x04fc, 0x7333), DVNM("PalmPixDC85")}, 1070 {USB_DEVICE(0x04fc, 0x7333), PalmPixDC85},
1170 {USB_DEVICE(0x055f, 0xc200), DVNM("Mustek Gsmart 300")}, 1071 {USB_DEVICE(0x055f, 0xc200), MustekGsmart300},
1171 {USB_DEVICE(0x055f, 0xc220), DVNM("Gsmart Mini")}, 1072 {USB_DEVICE(0x055f, 0xc220), Gsmartmini},
1172 {USB_DEVICE(0x06bd, 0x0404), DVNM("Agfa CL20")}, 1073 {USB_DEVICE(0x06bd, 0x0404), AgfaCl20},
1173 {USB_DEVICE(0x06be, 0x0800), DVNM("Optimedia")}, 1074 {USB_DEVICE(0x06be, 0x0800), Optimedia},
1174 {USB_DEVICE(0x084d, 0x0003), DVNM("D-Link DSC-350")}, 1075 {USB_DEVICE(0x084d, 0x0003), DLinkDSC350},
1175 {USB_DEVICE(0x08ca, 0x0103), DVNM("Aiptek PocketDV")}, 1076 {USB_DEVICE(0x08ca, 0x0103), AiptekPocketDV},
1176 {USB_DEVICE(0x2899, 0x012c), DVNM("Toptro Industrial")}, 1077 {USB_DEVICE(0x2899, 0x012c), ToptroIndus},
1177 {USB_DEVICE(0x8086, 0x0630), DVNM("Intel Pocket PC Camera")}, 1078 {USB_DEVICE(0x8086, 0x0630), IntelPocketPCCamera},
1178 {} 1079 {}
1179}; 1080};
1180MODULE_DEVICE_TABLE(usb, device_table); 1081MODULE_DEVICE_TABLE(usb, device_table);