diff options
Diffstat (limited to 'drivers/media/video/gspca/spca500.c')
-rw-r--r-- | drivers/media/video/gspca/spca500.c | 139 |
1 files changed, 18 insertions, 121 deletions
diff --git a/drivers/media/video/gspca/spca500.c b/drivers/media/video/gspca/spca500.c index 156206118795..17fe2c2a440d 100644 --- a/drivers/media/video/gspca/spca500.c +++ b/drivers/media/video/gspca/spca500.c | |||
@@ -24,9 +24,6 @@ | |||
24 | #include "gspca.h" | 24 | #include "gspca.h" |
25 | #include "jpeg.h" | 25 | #include "jpeg.h" |
26 | 26 | ||
27 | #define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 7) | ||
28 | static const char version[] = "2.1.7"; | ||
29 | |||
30 | MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); | 27 | MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); |
31 | MODULE_DESCRIPTION("GSPCA/SPCA500 USB Camera Driver"); | 28 | MODULE_DESCRIPTION("GSPCA/SPCA500 USB Camera Driver"); |
32 | MODULE_LICENSE("GPL"); | 29 | MODULE_LICENSE("GPL"); |
@@ -630,109 +627,10 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
630 | { | 627 | { |
631 | struct sd *sd = (struct sd *) gspca_dev; | 628 | struct sd *sd = (struct sd *) gspca_dev; |
632 | struct cam *cam; | 629 | struct cam *cam; |
633 | __u16 vendor; | 630 | |
634 | __u16 product; | ||
635 | |||
636 | vendor = id->idVendor; | ||
637 | product = id->idProduct; | ||
638 | switch (vendor) { | ||
639 | case 0x040a: /* Kodak cameras */ | ||
640 | /* switch (product) { */ | ||
641 | /* case 0x0300: */ | ||
642 | sd->subtype = KodakEZ200; | ||
643 | /* break; */ | ||
644 | /* } */ | ||
645 | break; | ||
646 | case 0x041e: /* Creative cameras */ | ||
647 | /* switch (product) { */ | ||
648 | /* case 0x400a: */ | ||
649 | sd->subtype = CreativePCCam300; | ||
650 | /* break; */ | ||
651 | /* } */ | ||
652 | break; | ||
653 | case 0x046d: /* Logitech Labtec */ | ||
654 | switch (product) { | ||
655 | case 0x0890: | ||
656 | sd->subtype = LogitechTraveler; | ||
657 | break; | ||
658 | case 0x0900: | ||
659 | sd->subtype = LogitechClickSmart310; | ||
660 | break; | ||
661 | case 0x0901: | ||
662 | sd->subtype = LogitechClickSmart510; | ||
663 | break; | ||
664 | } | ||
665 | break; | ||
666 | case 0x04a5: /* Benq */ | ||
667 | /* switch (product) { */ | ||
668 | /* case 0x300c: */ | ||
669 | sd->subtype = BenqDC1016; | ||
670 | /* break; */ | ||
671 | /* } */ | ||
672 | break; | ||
673 | case 0x04fc: /* SunPlus */ | ||
674 | /* switch (product) { */ | ||
675 | /* case 0x7333: */ | ||
676 | sd->subtype = PalmPixDC85; | ||
677 | /* break; */ | ||
678 | /* } */ | ||
679 | break; | ||
680 | case 0x055f: /* Mustek cameras */ | ||
681 | switch (product) { | ||
682 | case 0xc200: | ||
683 | sd->subtype = MustekGsmart300; | ||
684 | break; | ||
685 | case 0xc220: | ||
686 | sd->subtype = Gsmartmini; | ||
687 | break; | ||
688 | } | ||
689 | break; | ||
690 | case 0x06bd: /* Agfa Cl20 */ | ||
691 | /* switch (product) { */ | ||
692 | /* case 0x0404: */ | ||
693 | sd->subtype = AgfaCl20; | ||
694 | /* break; */ | ||
695 | /* } */ | ||
696 | break; | ||
697 | case 0x06be: /* Optimedia */ | ||
698 | /* switch (product) { */ | ||
699 | /* case 0x0800: */ | ||
700 | sd->subtype = Optimedia; | ||
701 | /* break; */ | ||
702 | /* } */ | ||
703 | break; | ||
704 | case 0x084d: /* D-Link / Minton */ | ||
705 | /* switch (product) { */ | ||
706 | /* case 0x0003: * DSC-350 / S-Cam F5 */ | ||
707 | sd->subtype = DLinkDSC350; | ||
708 | /* break; */ | ||
709 | /* } */ | ||
710 | break; | ||
711 | case 0x08ca: /* Aiptek */ | ||
712 | /* switch (product) { */ | ||
713 | /* case 0x0103: */ | ||
714 | sd->subtype = AiptekPocketDV; | ||
715 | /* break; */ | ||
716 | /* } */ | ||
717 | break; | ||
718 | case 0x2899: /* ToptroIndustrial */ | ||
719 | /* switch (product) { */ | ||
720 | /* case 0x012c: */ | ||
721 | sd->subtype = ToptroIndus; | ||
722 | /* break; */ | ||
723 | /* } */ | ||
724 | break; | ||
725 | case 0x8086: /* Intel */ | ||
726 | /* switch (product) { */ | ||
727 | /* case 0x0630: * Pocket PC Camera */ | ||
728 | sd->subtype = IntelPocketPCCamera; | ||
729 | /* break; */ | ||
730 | /* } */ | ||
731 | break; | ||
732 | } | ||
733 | cam = &gspca_dev->cam; | 631 | cam = &gspca_dev->cam; |
734 | cam->dev_name = (char *) id->driver_info; | ||
735 | cam->epaddr = 0x01; | 632 | cam->epaddr = 0x01; |
633 | sd->subtype = id->driver_info; | ||
736 | if (sd->subtype != LogitechClickSmart310) { | 634 | if (sd->subtype != LogitechClickSmart310) { |
737 | cam->cam_mode = vga_mode; | 635 | cam->cam_mode = vga_mode; |
738 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; | 636 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; |
@@ -1162,23 +1060,22 @@ static struct sd_desc sd_desc = { | |||
1162 | }; | 1060 | }; |
1163 | 1061 | ||
1164 | /* -- module initialisation -- */ | 1062 | /* -- module initialisation -- */ |
1165 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
1166 | static const __devinitdata struct usb_device_id device_table[] = { | 1063 | static const __devinitdata struct usb_device_id device_table[] = { |
1167 | {USB_DEVICE(0x040a, 0x0300), DVNM("Kodak EZ200")}, | 1064 | {USB_DEVICE(0x040a, 0x0300), .driver_info = KodakEZ200}, |
1168 | {USB_DEVICE(0x041e, 0x400a), DVNM("Creative PC-CAM 300")}, | 1065 | {USB_DEVICE(0x041e, 0x400a), .driver_info = CreativePCCam300}, |
1169 | {USB_DEVICE(0x046d, 0x0890), DVNM("Logitech QuickCam traveler")}, | 1066 | {USB_DEVICE(0x046d, 0x0890), .driver_info = LogitechTraveler}, |
1170 | {USB_DEVICE(0x046d, 0x0900), DVNM("Logitech Inc. ClickSmart 310")}, | 1067 | {USB_DEVICE(0x046d, 0x0900), .driver_info = LogitechClickSmart310}, |
1171 | {USB_DEVICE(0x046d, 0x0901), DVNM("Logitech Inc. ClickSmart 510")}, | 1068 | {USB_DEVICE(0x046d, 0x0901), .driver_info = LogitechClickSmart510}, |
1172 | {USB_DEVICE(0x04a5, 0x300c), DVNM("Benq DC1016")}, | 1069 | {USB_DEVICE(0x04a5, 0x300c), .driver_info = BenqDC1016}, |
1173 | {USB_DEVICE(0x04fc, 0x7333), DVNM("PalmPixDC85")}, | 1070 | {USB_DEVICE(0x04fc, 0x7333), .driver_info = PalmPixDC85}, |
1174 | {USB_DEVICE(0x055f, 0xc200), DVNM("Mustek Gsmart 300")}, | 1071 | {USB_DEVICE(0x055f, 0xc200), .driver_info = MustekGsmart300}, |
1175 | {USB_DEVICE(0x055f, 0xc220), DVNM("Gsmart Mini")}, | 1072 | {USB_DEVICE(0x055f, 0xc220), .driver_info = Gsmartmini}, |
1176 | {USB_DEVICE(0x06bd, 0x0404), DVNM("Agfa CL20")}, | 1073 | {USB_DEVICE(0x06bd, 0x0404), .driver_info = AgfaCl20}, |
1177 | {USB_DEVICE(0x06be, 0x0800), DVNM("Optimedia")}, | 1074 | {USB_DEVICE(0x06be, 0x0800), .driver_info = Optimedia}, |
1178 | {USB_DEVICE(0x084d, 0x0003), DVNM("D-Link DSC-350")}, | 1075 | {USB_DEVICE(0x084d, 0x0003), .driver_info = DLinkDSC350}, |
1179 | {USB_DEVICE(0x08ca, 0x0103), DVNM("Aiptek PocketDV")}, | 1076 | {USB_DEVICE(0x08ca, 0x0103), .driver_info = AiptekPocketDV}, |
1180 | {USB_DEVICE(0x2899, 0x012c), DVNM("Toptro Industrial")}, | 1077 | {USB_DEVICE(0x2899, 0x012c), .driver_info = ToptroIndus}, |
1181 | {USB_DEVICE(0x8086, 0x0630), DVNM("Intel Pocket PC Camera")}, | 1078 | {USB_DEVICE(0x8086, 0x0630), .driver_info = IntelPocketPCCamera}, |
1182 | {} | 1079 | {} |
1183 | }; | 1080 | }; |
1184 | MODULE_DEVICE_TABLE(usb, device_table); | 1081 | MODULE_DEVICE_TABLE(usb, device_table); |
@@ -1203,7 +1100,7 @@ static int __init sd_mod_init(void) | |||
1203 | { | 1100 | { |
1204 | if (usb_register(&sd_driver) < 0) | 1101 | if (usb_register(&sd_driver) < 0) |
1205 | return -1; | 1102 | return -1; |
1206 | PDEBUG(D_PROBE, "v%s registered", version); | 1103 | PDEBUG(D_PROBE, "registered"); |
1207 | return 0; | 1104 | return 0; |
1208 | } | 1105 | } |
1209 | static void __exit sd_mod_exit(void) | 1106 | static void __exit sd_mod_exit(void) |