diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-07-25 07:53:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-27 10:06:38 -0400 |
commit | 9d64fdb15b1b9ce9144cfde4001e9194ccde42d1 (patch) | |
tree | da578050af9867c0247b55099b4e7337f8fea2b4 /drivers/media/video/gspca | |
parent | 07767ebda385956bd2b193f9820de719475bfe6e (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')
-rw-r--r-- | drivers/media/video/gspca/conex.c | 3 | ||||
-rw-r--r-- | drivers/media/video/gspca/etoms.c | 24 | ||||
-rw-r--r-- | drivers/media/video/gspca/mars.c | 3 | ||||
-rw-r--r-- | drivers/media/video/gspca/ov519.c | 27 | ||||
-rw-r--r-- | drivers/media/video/gspca/pac207.c | 19 | ||||
-rw-r--r-- | drivers/media/video/gspca/pac7311.c | 16 | ||||
-rw-r--r-- | drivers/media/video/gspca/sonixj.c | 243 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca500.c | 133 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca501.c | 69 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca505.c | 29 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca506.c | 10 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca508.c | 67 | ||||
-rw-r--r-- | drivers/media/video/gspca/spca561.c | 57 | ||||
-rw-r--r-- | drivers/media/video/gspca/stk014.c | 3 | ||||
-rw-r--r-- | drivers/media/video/gspca/sunplus.c | 349 | ||||
-rw-r--r-- | drivers/media/video/gspca/t613.c | 3 | ||||
-rw-r--r-- | drivers/media/video/gspca/tv8532.c | 11 | ||||
-rw-r--r-- | drivers/media/video/gspca/vc032x.c | 38 | ||||
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 125 |
19 files changed, 284 insertions, 945 deletions
diff --git a/drivers/media/video/gspca/conex.c b/drivers/media/video/gspca/conex.c index f5ef7599d3ca..44b0bffeb20e 100644 --- a/drivers/media/video/gspca/conex.c +++ b/drivers/media/video/gspca/conex.c | |||
@@ -1007,9 +1007,8 @@ static struct sd_desc sd_desc = { | |||
1007 | }; | 1007 | }; |
1008 | 1008 | ||
1009 | /* -- module initialisation -- */ | 1009 | /* -- module initialisation -- */ |
1010 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
1011 | static __devinitdata struct usb_device_id device_table[] = { | 1010 | static __devinitdata struct usb_device_id device_table[] = { |
1012 | {USB_DEVICE(0x0572, 0x0041), DVNM("Creative Notebook cx11646")}, | 1011 | {USB_DEVICE(0x0572, 0x0041)}, |
1013 | {} | 1012 | {} |
1014 | }; | 1013 | }; |
1015 | MODULE_DEVICE_TABLE(usb, device_table); | 1014 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/etoms.c b/drivers/media/video/gspca/etoms.c index 7529bb0bf6fc..c8c2f02fcf00 100644 --- a/drivers/media/video/gspca/etoms.c +++ b/drivers/media/video/gspca/etoms.c | |||
@@ -599,25 +599,10 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
599 | { | 599 | { |
600 | struct sd *sd = (struct sd *) gspca_dev; | 600 | struct sd *sd = (struct sd *) gspca_dev; |
601 | struct cam *cam; | 601 | struct cam *cam; |
602 | __u16 vendor; | 602 | |
603 | __u16 product; | ||
604 | |||
605 | vendor = id->idVendor; | ||
606 | product = id->idProduct; | ||
607 | /* switch (vendor) { */ | ||
608 | /* case 0x102c: * Etoms */ | ||
609 | switch (product) { | ||
610 | case 0x6151: | ||
611 | sd->sensor = SENSOR_PAS106; /* Etoms61x151 */ | ||
612 | break; | ||
613 | case 0x6251: | ||
614 | sd->sensor = SENSOR_TAS5130CXX; /* Etoms61x251 */ | ||
615 | break; | ||
616 | /* } */ | ||
617 | /* break; */ | ||
618 | } | ||
619 | cam = &gspca_dev->cam; | 603 | cam = &gspca_dev->cam; |
620 | cam->epaddr = 1; | 604 | cam->epaddr = 1; |
605 | sd->sensor = id->driver_info; | ||
621 | if (sd->sensor == SENSOR_PAS106) { | 606 | if (sd->sensor == SENSOR_PAS106) { |
622 | cam->cam_mode = sif_mode; | 607 | cam->cam_mode = sif_mode; |
623 | cam->nmodes = sizeof sif_mode / sizeof sif_mode[0]; | 608 | cam->nmodes = sizeof sif_mode / sizeof sif_mode[0]; |
@@ -907,12 +892,11 @@ static struct sd_desc sd_desc = { | |||
907 | }; | 892 | }; |
908 | 893 | ||
909 | /* -- module initialisation -- */ | 894 | /* -- module initialisation -- */ |
910 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
911 | static __devinitdata struct usb_device_id device_table[] = { | 895 | static __devinitdata struct usb_device_id device_table[] = { |
912 | #ifndef CONFIG_USB_ET61X251 | 896 | #ifndef CONFIG_USB_ET61X251 |
913 | {USB_DEVICE(0x102c, 0x6151), DVNM("Qcam Sangha CIF")}, | 897 | {USB_DEVICE(0x102c, 0x6151), .driver_info = SENSOR_PAS106}, |
914 | #endif | 898 | #endif |
915 | {USB_DEVICE(0x102c, 0x6251), DVNM("Qcam xxxxxx VGA")}, | 899 | {USB_DEVICE(0x102c, 0x6251), .driver_info = SENSOR_TAS5130CXX}, |
916 | {} | 900 | {} |
917 | }; | 901 | }; |
918 | 902 | ||
diff --git a/drivers/media/video/gspca/mars.c b/drivers/media/video/gspca/mars.c index 2d47876bfec9..21c4ee56a10a 100644 --- a/drivers/media/video/gspca/mars.c +++ b/drivers/media/video/gspca/mars.c | |||
@@ -420,9 +420,8 @@ static const struct sd_desc sd_desc = { | |||
420 | }; | 420 | }; |
421 | 421 | ||
422 | /* -- module initialisation -- */ | 422 | /* -- module initialisation -- */ |
423 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
424 | static const __devinitdata struct usb_device_id device_table[] = { | 423 | static const __devinitdata struct usb_device_id device_table[] = { |
425 | {USB_DEVICE(0x093a, 0x050f), DVNM("Mars-Semi Pc-Camera")}, | 424 | {USB_DEVICE(0x093a, 0x050f)}, |
426 | {} | 425 | {} |
427 | }; | 426 | }; |
428 | MODULE_DEVICE_TABLE(usb, device_table); | 427 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/ov519.c b/drivers/media/video/gspca/ov519.c index 9109cbbb6fc1..83139efc4629 100644 --- a/drivers/media/video/gspca/ov519.c +++ b/drivers/media/video/gspca/ov519.c | |||
@@ -2125,21 +2125,20 @@ static const struct sd_desc sd_desc = { | |||
2125 | }; | 2125 | }; |
2126 | 2126 | ||
2127 | /* -- module initialisation -- */ | 2127 | /* -- module initialisation -- */ |
2128 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
2129 | static const __devinitdata struct usb_device_id device_table[] = { | 2128 | static const __devinitdata struct usb_device_id device_table[] = { |
2130 | {USB_DEVICE(0x041e, 0x4052), DVNM("Creative Live! VISTA IM")}, | 2129 | {USB_DEVICE(0x041e, 0x4052)}, |
2131 | {USB_DEVICE(0x041e, 0x405f), DVNM("Creative Live! VISTA VF0330")}, | 2130 | {USB_DEVICE(0x041e, 0x405f)}, |
2132 | {USB_DEVICE(0x041e, 0x4060), DVNM("Creative Live! VISTA VF0350")}, | 2131 | {USB_DEVICE(0x041e, 0x4060)}, |
2133 | {USB_DEVICE(0x041e, 0x4061), DVNM("Creative Live! VISTA VF0400")}, | 2132 | {USB_DEVICE(0x041e, 0x4061)}, |
2134 | {USB_DEVICE(0x041e, 0x4064), DVNM("Creative Live! VISTA VF0420")}, | 2133 | {USB_DEVICE(0x041e, 0x4064)}, |
2135 | {USB_DEVICE(0x041e, 0x4068), DVNM("Creative Live! VISTA VF0470")}, | 2134 | {USB_DEVICE(0x041e, 0x4068)}, |
2136 | {USB_DEVICE(0x045e, 0x028c), DVNM("Microsoft xbox cam")}, | 2135 | {USB_DEVICE(0x045e, 0x028c)}, |
2137 | {USB_DEVICE(0x054c, 0x0154), DVNM("Sonny toy4")}, | 2136 | {USB_DEVICE(0x054c, 0x0154)}, |
2138 | {USB_DEVICE(0x054c, 0x0155), DVNM("Sonny toy5")}, | 2137 | {USB_DEVICE(0x054c, 0x0155)}, |
2139 | {USB_DEVICE(0x05a9, 0x0519), DVNM("OmniVision")}, | 2138 | {USB_DEVICE(0x05a9, 0x0519)}, |
2140 | {USB_DEVICE(0x05a9, 0x0530), DVNM("OmniVision")}, | 2139 | {USB_DEVICE(0x05a9, 0x0530)}, |
2141 | {USB_DEVICE(0x05a9, 0x4519), DVNM("OmniVision")}, | 2140 | {USB_DEVICE(0x05a9, 0x4519)}, |
2142 | {USB_DEVICE(0x05a9, 0x8519), DVNM("OmniVision")}, | 2141 | {USB_DEVICE(0x05a9, 0x8519)}, |
2143 | {} | 2142 | {} |
2144 | }; | 2143 | }; |
2145 | #undef DVNAME | 2144 | #undef DVNAME |
diff --git a/drivers/media/video/gspca/pac207.c b/drivers/media/video/gspca/pac207.c index f790746370d7..7ef18d578811 100644 --- a/drivers/media/video/gspca/pac207.c +++ b/drivers/media/video/gspca/pac207.c | |||
@@ -570,17 +570,16 @@ static const struct sd_desc sd_desc = { | |||
570 | }; | 570 | }; |
571 | 571 | ||
572 | /* -- module initialisation -- */ | 572 | /* -- module initialisation -- */ |
573 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
574 | static const __devinitdata struct usb_device_id device_table[] = { | 573 | static const __devinitdata struct usb_device_id device_table[] = { |
575 | {USB_DEVICE(0x041e, 0x4028), DVNM("Creative Webcam Vista Plus")}, | 574 | {USB_DEVICE(0x041e, 0x4028)}, |
576 | {USB_DEVICE(0x093a, 0x2460), DVNM("Q-Tec Webcam 100")}, | 575 | {USB_DEVICE(0x093a, 0x2460)}, |
577 | {USB_DEVICE(0x093a, 0x2463), DVNM("Philips spc200nc pac207")}, | 576 | {USB_DEVICE(0x093a, 0x2463)}, |
578 | {USB_DEVICE(0x093a, 0x2464), DVNM("Labtec Webcam 1200")}, | 577 | {USB_DEVICE(0x093a, 0x2464)}, |
579 | {USB_DEVICE(0x093a, 0x2468), DVNM("PAC207")}, | 578 | {USB_DEVICE(0x093a, 0x2468)}, |
580 | {USB_DEVICE(0x093a, 0x2470), DVNM("Genius GF112")}, | 579 | {USB_DEVICE(0x093a, 0x2470)}, |
581 | {USB_DEVICE(0x093a, 0x2471), DVNM("Genius VideoCam GE111")}, | 580 | {USB_DEVICE(0x093a, 0x2471)}, |
582 | {USB_DEVICE(0x093a, 0x2472), DVNM("Genius VideoCam GE110")}, | 581 | {USB_DEVICE(0x093a, 0x2472)}, |
583 | {USB_DEVICE(0x2001, 0xf115), DVNM("D-Link DSB-C120")}, | 582 | {USB_DEVICE(0x2001, 0xf115)}, |
584 | {} | 583 | {} |
585 | }; | 584 | }; |
586 | MODULE_DEVICE_TABLE(usb, device_table); | 585 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/pac7311.c b/drivers/media/video/gspca/pac7311.c index ad802a72cf04..ea3d7021f401 100644 --- a/drivers/media/video/gspca/pac7311.c +++ b/drivers/media/video/gspca/pac7311.c | |||
@@ -709,16 +709,14 @@ static struct sd_desc sd_desc = { | |||
709 | }; | 709 | }; |
710 | 710 | ||
711 | /* -- module initialisation -- */ | 711 | /* -- module initialisation -- */ |
712 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
713 | static __devinitdata struct usb_device_id device_table[] = { | 712 | static __devinitdata struct usb_device_id device_table[] = { |
714 | {USB_DEVICE(0x093a, 0x2600), DVNM("Typhoon")}, | 713 | {USB_DEVICE(0x093a, 0x2600)}, |
715 | {USB_DEVICE(0x093a, 0x2601), DVNM("Philips SPC610NC")}, | 714 | {USB_DEVICE(0x093a, 0x2601)}, |
716 | {USB_DEVICE(0x093a, 0x2603), DVNM("PAC7312")}, | 715 | {USB_DEVICE(0x093a, 0x2603)}, |
717 | {USB_DEVICE(0x093a, 0x2608), DVNM("Trust WB-3300p")}, | 716 | {USB_DEVICE(0x093a, 0x2608)}, |
718 | {USB_DEVICE(0x093a, 0x260e), DVNM("Gigaware VGA PC Camera")}, | 717 | {USB_DEVICE(0x093a, 0x260e)}, |
719 | /* and also ', Trust WB-3350p, SIGMA cam 2350' */ | 718 | {USB_DEVICE(0x093a, 0x260f)}, |
720 | {USB_DEVICE(0x093a, 0x260f), DVNM("SnakeCam")}, | 719 | {USB_DEVICE(0x093a, 0x2621)}, |
721 | {USB_DEVICE(0x093a, 0x2621), DVNM("PAC731x")}, | ||
722 | {} | 720 | {} |
723 | }; | 721 | }; |
724 | MODULE_DEVICE_TABLE(usb, device_table); | 722 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c index 3f8418c7e5fd..46f2cf66d48f 100644 --- a/drivers/media/video/gspca/sonixj.c +++ b/drivers/media/video/gspca/sonixj.c | |||
@@ -795,191 +795,16 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
795 | { | 795 | { |
796 | struct sd *sd = (struct sd *) gspca_dev; | 796 | struct sd *sd = (struct sd *) gspca_dev; |
797 | struct cam *cam; | 797 | struct cam *cam; |
798 | __u16 product; | ||
799 | |||
800 | product = id->idProduct; | ||
801 | sd->sensor = -1; | ||
802 | switch (id->idVendor) { | ||
803 | case 0x0458: /* Genius */ | ||
804 | /* switch (product) { | ||
805 | case 0x7025: */ | ||
806 | sd->bridge = BRIDGE_SN9C120; | ||
807 | sd->sensor = SENSOR_MI0360; | ||
808 | sd->i2c_base = 0x5d; | ||
809 | /* break; | ||
810 | } */ | ||
811 | break; | ||
812 | case 0x045e: | ||
813 | /* switch (product) { | ||
814 | case 0x00f5: | ||
815 | case 0x00f7: */ | ||
816 | sd->bridge = BRIDGE_SN9C105; | ||
817 | sd->sensor = SENSOR_OV7660; | ||
818 | sd->i2c_base = 0x21; | ||
819 | /* break; | ||
820 | } */ | ||
821 | break; | ||
822 | case 0x0471: /* Philips */ | ||
823 | /* switch (product) { | ||
824 | case 0x0327: | ||
825 | case 0x0328: | ||
826 | case 0x0330: */ | ||
827 | sd->bridge = BRIDGE_SN9C105; | ||
828 | sd->sensor = SENSOR_MI0360; | ||
829 | sd->i2c_base = 0x5d; | ||
830 | /* break; | ||
831 | } */ | ||
832 | break; | ||
833 | case 0x0c45: /* Sonix */ | ||
834 | switch (product) { | ||
835 | case 0x6040: | ||
836 | sd->bridge = BRIDGE_SN9C102P; | ||
837 | /* sd->sensor = SENSOR_MI0360; * from BW600.inf */ | ||
838 | /*fixme: MI0360 base=5d ? */ | ||
839 | sd->sensor = SENSOR_HV7131R; /* gspcav1 value */ | ||
840 | sd->i2c_base = 0x11; | ||
841 | break; | ||
842 | /* case 0x607a: * from BW600.inf | ||
843 | sd->bridge = BRIDGE_SN9C102P; | ||
844 | sd->sensor = SENSOR_OV7648; | ||
845 | sd->i2c_base = 0x??; | ||
846 | break; */ | ||
847 | case 0x607c: | ||
848 | sd->bridge = BRIDGE_SN9C102P; | ||
849 | sd->sensor = SENSOR_HV7131R; | ||
850 | sd->i2c_base = 0x11; | ||
851 | break; | ||
852 | /* case 0x607e: * from BW600.inf | ||
853 | sd->bridge = BRIDGE_SN9C102P; | ||
854 | sd->sensor = SENSOR_OV7630; | ||
855 | sd->i2c_base = 0x??; | ||
856 | break; */ | ||
857 | case 0x60c0: | ||
858 | sd->bridge = BRIDGE_SN9C105; | ||
859 | sd->sensor = SENSOR_MI0360; | ||
860 | sd->i2c_base = 0x5d; | ||
861 | break; | ||
862 | /* case 0x60c8: * from BW600.inf | ||
863 | sd->bridge = BRIDGE_SN9C105; | ||
864 | sd->sensor = SENSOR_OM6801; | ||
865 | sd->i2c_base = 0x??; | ||
866 | break; */ | ||
867 | /* case 0x60cc: * from BW600.inf | ||
868 | sd->bridge = BRIDGE_SN9C105; | ||
869 | sd->sensor = SENSOR_HV7131GP; | ||
870 | sd->i2c_base = 0x??; | ||
871 | break; */ | ||
872 | case 0x60ec: | ||
873 | sd->bridge = BRIDGE_SN9C105; | ||
874 | sd->sensor = SENSOR_MO4000; | ||
875 | sd->i2c_base = 0x21; | ||
876 | break; | ||
877 | /* case 0x60ef: * from BW600.inf | ||
878 | sd->bridge = BRIDGE_SN9C105; | ||
879 | sd->sensor = SENSOR_ICM105C; | ||
880 | sd->i2c_base = 0x??; | ||
881 | break; */ | ||
882 | /* case 0x60fa: * from BW600.inf | ||
883 | sd->bridge = BRIDGE_SN9C105; | ||
884 | sd->sensor = SENSOR_OV7648; | ||
885 | sd->i2c_base = 0x??; | ||
886 | break; */ | ||
887 | case 0x60fb: | ||
888 | sd->bridge = BRIDGE_SN9C105; | ||
889 | sd->sensor = SENSOR_OV7660; | ||
890 | sd->i2c_base = 0x21; | ||
891 | break; | ||
892 | case 0x60fc: | ||
893 | sd->bridge = BRIDGE_SN9C105; | ||
894 | sd->sensor = SENSOR_HV7131R; | ||
895 | sd->i2c_base = 0x11; | ||
896 | break; | ||
897 | /* case 0x60fe: * from BW600.inf | ||
898 | sd->bridge = BRIDGE_SN9C105; | ||
899 | sd->sensor = SENSOR_OV7630; | ||
900 | sd->i2c_base = 0x??; | ||
901 | break; */ | ||
902 | /* case 0x6108: * from BW600.inf | ||
903 | sd->bridge = BRIDGE_SN9C120; | ||
904 | sd->sensor = SENSOR_OM6801; | ||
905 | sd->i2c_base = 0x??; | ||
906 | break; */ | ||
907 | /* case 0x6122: * from BW600.inf | ||
908 | sd->bridge = BRIDGE_SN9C110; | ||
909 | sd->sensor = SENSOR_ICM105C; | ||
910 | sd->i2c_base = 0x??; | ||
911 | break; */ | ||
912 | case 0x612a: | ||
913 | /* sd->bridge = BRIDGE_SN9C110; * in BW600.inf */ | ||
914 | sd->bridge = BRIDGE_SN9C325; | ||
915 | sd->sensor = SENSOR_OV7648; | ||
916 | sd->i2c_base = 0x21; | ||
917 | /*fixme: sensor_init has base = 00 et 6e!*/ | ||
918 | break; | ||
919 | /* case 0x6123: * from BW600.inf | ||
920 | sd->bridge = BRIDGE_SN9C110; | ||
921 | sd->sensor = SENSOR_SanyoCCD; | ||
922 | sd->i2c_base = 0x??; | ||
923 | break; */ | ||
924 | case 0x612c: | ||
925 | sd->bridge = BRIDGE_SN9C110; | ||
926 | sd->sensor = SENSOR_MO4000; | ||
927 | sd->i2c_base = 0x21; | ||
928 | break; | ||
929 | /* case 0x612e: * from BW600.inf | ||
930 | sd->bridge = BRIDGE_SN9C110; | ||
931 | sd->sensor = SENSOR_OV7630; | ||
932 | sd->i2c_base = 0x??; | ||
933 | break; */ | ||
934 | /* case 0x612f: * from BW600.inf | ||
935 | sd->bridge = BRIDGE_SN9C110; | ||
936 | sd->sensor = SENSOR_ICM105C; | ||
937 | sd->i2c_base = 0x??; | ||
938 | break; */ | ||
939 | case 0x6130: | ||
940 | sd->bridge = BRIDGE_SN9C120; | ||
941 | sd->sensor = SENSOR_MI0360; | ||
942 | sd->i2c_base = 0x5d; | ||
943 | break; | ||
944 | case 0x6138: | ||
945 | sd->bridge = BRIDGE_SN9C120; | ||
946 | sd->sensor = SENSOR_MO4000; | ||
947 | sd->i2c_base = 0x21; | ||
948 | break; | ||
949 | /* case 0x613a: * from BW600.inf | ||
950 | sd->bridge = BRIDGE_SN9C120; | ||
951 | sd->sensor = SENSOR_OV7648; | ||
952 | sd->i2c_base = 0x??; | ||
953 | break; */ | ||
954 | case 0x613b: | ||
955 | sd->bridge = BRIDGE_SN9C120; | ||
956 | sd->sensor = SENSOR_OV7660; | ||
957 | sd->i2c_base = 0x21; | ||
958 | break; | ||
959 | case 0x613c: | ||
960 | sd->bridge = BRIDGE_SN9C120; | ||
961 | sd->sensor = SENSOR_HV7131R; | ||
962 | sd->i2c_base = 0x11; | ||
963 | break; | ||
964 | /* case 0x613e: * from BW600.inf | ||
965 | sd->bridge = BRIDGE_SN9C120; | ||
966 | sd->sensor = SENSOR_OV7630; | ||
967 | sd->i2c_base = 0x??; | ||
968 | break; */ | ||
969 | } | ||
970 | break; | ||
971 | } | ||
972 | if (sd->sensor < 0) { | ||
973 | PDEBUG(D_ERR, "Invalid vendor/product %04x:%04x", | ||
974 | id->idVendor, product); | ||
975 | return -EINVAL; | ||
976 | } | ||
977 | 798 | ||
978 | cam = &gspca_dev->cam; | 799 | cam = &gspca_dev->cam; |
979 | cam->epaddr = 0x01; | 800 | cam->epaddr = 0x01; |
980 | cam->cam_mode = vga_mode; | 801 | cam->cam_mode = vga_mode; |
981 | cam->nmodes = ARRAY_SIZE(vga_mode); | 802 | cam->nmodes = ARRAY_SIZE(vga_mode); |
982 | 803 | ||
804 | sd->bridge = id->driver_info >> 16; | ||
805 | sd->sensor = id->driver_info >> 8; | ||
806 | sd->i2c_base = id->driver_info; | ||
807 | |||
983 | sd->qindex = 4; /* set the quantization table */ | 808 | sd->qindex = 4; /* set the quantization table */ |
984 | sd->brightness = BRIGHTNESS_DEF; | 809 | sd->brightness = BRIGHTNESS_DEF; |
985 | sd->contrast = CONTRAST_DEF; | 810 | sd->contrast = CONTRAST_DEF; |
@@ -1596,29 +1421,51 @@ static const struct sd_desc sd_desc = { | |||
1596 | }; | 1421 | }; |
1597 | 1422 | ||
1598 | /* -- module initialisation -- */ | 1423 | /* -- module initialisation -- */ |
1599 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | 1424 | #define BSI(bridge, sensor, i2c_addr) \ |
1425 | .driver_info = (BRIDGE_ ## bridge << 16) \ | ||
1426 | | (SENSOR_ ## sensor << 8) \ | ||
1427 | | (i2c_addr) | ||
1600 | static const __devinitdata struct usb_device_id device_table[] = { | 1428 | static const __devinitdata struct usb_device_id device_table[] = { |
1601 | #ifndef CONFIG_USB_SN9C102 | 1429 | #ifndef CONFIG_USB_SN9C102 |
1602 | {USB_DEVICE(0x0458, 0x7025), DVNM("Genius Eye 311Q")}, | 1430 | {USB_DEVICE(0x0458, 0x7025), BSI(SN9C120, MI0360, 0x5d)}, |
1603 | {USB_DEVICE(0x045e, 0x00f5), DVNM("MicroSoft VX3000")}, | 1431 | {USB_DEVICE(0x045e, 0x00f5), BSI(SN9C105, OV7660, 0x21)}, |
1604 | {USB_DEVICE(0x045e, 0x00f7), DVNM("MicroSoft VX1000")}, | 1432 | {USB_DEVICE(0x045e, 0x00f7), BSI(SN9C105, OV7660, 0x21)}, |
1605 | {USB_DEVICE(0x0471, 0x0327), DVNM("Philips SPC 600 NC")}, | 1433 | {USB_DEVICE(0x0471, 0x0327), BSI(SN9C105, MI0360, 0x5d)}, |
1606 | {USB_DEVICE(0x0471, 0x0328), DVNM("Philips SPC 700 NC")}, | 1434 | {USB_DEVICE(0x0471, 0x0328), BSI(SN9C105, MI0360, 0x5d)}, |
1607 | #endif | 1435 | #endif |
1608 | {USB_DEVICE(0x0471, 0x0330), DVNM("Philips SPC 710NC")}, | 1436 | {USB_DEVICE(0x0471, 0x0330), BSI(SN9C105, MI0360, 0x5d)}, |
1609 | {USB_DEVICE(0x0c45, 0x6040), DVNM("Speed NVC 350K")}, | 1437 | {USB_DEVICE(0x0c45, 0x6040), BSI(SN9C102P, HV7131R, 0x11)}, |
1610 | {USB_DEVICE(0x0c45, 0x607c), DVNM("Sonix sn9c102p Hv7131R")}, | 1438 | /* bw600.inf: |
1611 | {USB_DEVICE(0x0c45, 0x60c0), DVNM("Sangha Sn535")}, | 1439 | {USB_DEVICE(0x0c45, 0x6040), BSI(SN9C102P, MI0360, 0x5d)}, */ |
1612 | {USB_DEVICE(0x0c45, 0x60ec), DVNM("SN9C105+MO4000")}, | 1440 | /* {USB_DEVICE(0x0c45, 0x603a), BSI(SN9C102P, OV7648, 0x??)}, */ |
1613 | {USB_DEVICE(0x0c45, 0x60fb), DVNM("Surfer NoName")}, | 1441 | /* {USB_DEVICE(0x0c45, 0x607a), BSI(SN9C102P, OV7648, 0x??)}, */ |
1614 | {USB_DEVICE(0x0c45, 0x60fc), DVNM("LG-LIC300")}, | 1442 | {USB_DEVICE(0x0c45, 0x607c), BSI(SN9C102P, HV7131R, 0x11)}, |
1615 | {USB_DEVICE(0x0c45, 0x612a), DVNM("Avant Camera")}, | 1443 | /* {USB_DEVICE(0x0c45, 0x607e), BSI(SN9C102P, OV7630, 0x??)}, */ |
1616 | {USB_DEVICE(0x0c45, 0x612c), DVNM("Typhoon Rasy Cam 1.3MPix")}, | 1444 | {USB_DEVICE(0x0c45, 0x60c0), BSI(SN9C105, MI0360, 0x5d)}, |
1445 | /* {USB_DEVICE(0x0c45, 0x60c8), BSI(SN9C105, OM6801, 0x??)}, */ | ||
1446 | /* {USB_DEVICE(0x0c45, 0x60cc), BSI(SN9C105, HV7131GP, 0x??)}, */ | ||
1447 | {USB_DEVICE(0x0c45, 0x60ec), BSI(SN9C105, MO4000, 0x21)}, | ||
1448 | /* {USB_DEVICE(0x0c45, 0x60ef), BSI(SN9C105, ICM105C, 0x??)}, */ | ||
1449 | /* {USB_DEVICE(0x0c45, 0x60fa), BSI(SN9C105, OV7648, 0x??)}, */ | ||
1450 | {USB_DEVICE(0x0c45, 0x60fb), BSI(SN9C105, OV7660, 0x21)}, | ||
1451 | {USB_DEVICE(0x0c45, 0x60fc), BSI(SN9C105, HV7131R, 0x11)}, | ||
1452 | /* {USB_DEVICE(0x0c45, 0x60fe), BSI(SN9C105, OV7630, 0x??)}, */ | ||
1453 | /* {USB_DEVICE(0x0c45, 0x6108), BSI(SN9C120, OM6801, 0x??)}, */ | ||
1454 | /* {USB_DEVICE(0x0c45, 0x6122), BSI(SN9C110, ICM105C, 0x??)}, */ | ||
1455 | /* {USB_DEVICE(0x0c45, 0x6123), BSI(SN9C110, SanyoCCD, 0x??)}, */ | ||
1456 | {USB_DEVICE(0x0c45, 0x612a), BSI(SN9C325, OV7648, 0x21)}, | ||
1457 | /* bw600.inf: | ||
1458 | {USB_DEVICE(0x0c45, 0x612a), BSI(SN9C110, OV7648, 0x21)}, */ | ||
1459 | {USB_DEVICE(0x0c45, 0x612c), BSI(SN9C110, MO4000, 0x21)}, | ||
1460 | /* {USB_DEVICE(0x0c45, 0x612e), BSI(SN9C110, OV7630, 0x??)}, */ | ||
1461 | /* {USB_DEVICE(0x0c45, 0x612f), BSI(SN9C110, ICM105C, 0x??)}, */ | ||
1617 | #ifndef CONFIG_USB_SN9C102 | 1462 | #ifndef CONFIG_USB_SN9C102 |
1618 | {USB_DEVICE(0x0c45, 0x6130), DVNM("Sonix Pccam")}, | 1463 | {USB_DEVICE(0x0c45, 0x6130), BSI(SN9C120, MI0360, 0x5d)}, |
1619 | {USB_DEVICE(0x0c45, 0x6138), DVNM("Sn9c120 Mo4000")}, | 1464 | {USB_DEVICE(0x0c45, 0x6138), BSI(SN9C120, MO4000, 0x21)}, |
1620 | {USB_DEVICE(0x0c45, 0x613b), DVNM("Surfer SN-206")}, | 1465 | /* {USB_DEVICE(0x0c45, 0x613a), BSI(SN9C120, OV7648, 0x??)}, */ |
1621 | {USB_DEVICE(0x0c45, 0x613c), DVNM("Sonix Pccam168")}, | 1466 | {USB_DEVICE(0x0c45, 0x613b), BSI(SN9C120, OV7660, 0x21)}, |
1467 | {USB_DEVICE(0x0c45, 0x613c), BSI(SN9C120, HV7131R, 0x11)}, | ||
1468 | /* {USB_DEVICE(0x0c45, 0x613e), BSI(SN9C120, OV7630, 0x??)}, */ | ||
1622 | #endif | 1469 | #endif |
1623 | {} | 1470 | {} |
1624 | }; | 1471 | }; |
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 | ||
1162 | static const __devinitdata struct usb_device_id device_table[] = { | 1063 | static 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 | }; |
1180 | MODULE_DEVICE_TABLE(usb, device_table); | 1081 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index a695c42e10cf..a8a460c6eb0c 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c | |||
@@ -1920,62 +1920,12 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1920 | { | 1920 | { |
1921 | struct sd *sd = (struct sd *) gspca_dev; | 1921 | struct sd *sd = (struct sd *) gspca_dev; |
1922 | struct cam *cam; | 1922 | struct cam *cam; |
1923 | __u16 vendor; | 1923 | |
1924 | __u16 product; | ||
1925 | |||
1926 | vendor = id->idVendor; | ||
1927 | product = id->idProduct; | ||
1928 | switch (vendor) { | ||
1929 | case 0x0000: /* Unknow Camera */ | ||
1930 | /* switch (product) { */ | ||
1931 | /* case 0x0000: */ | ||
1932 | sd->subtype = MystFromOriUnknownCamera; | ||
1933 | /* break; */ | ||
1934 | /* } */ | ||
1935 | break; | ||
1936 | case 0x040a: /* Kodak cameras */ | ||
1937 | /* switch (product) { */ | ||
1938 | /* case 0x0002: */ | ||
1939 | sd->subtype = KodakDVC325; | ||
1940 | /* break; */ | ||
1941 | /* } */ | ||
1942 | break; | ||
1943 | case 0x0497: /* Smile International */ | ||
1944 | /* switch (product) { */ | ||
1945 | /* case 0xc001: */ | ||
1946 | sd->subtype = SmileIntlCamera; | ||
1947 | /* break; */ | ||
1948 | /* } */ | ||
1949 | break; | ||
1950 | case 0x0506: /* 3COM cameras */ | ||
1951 | /* switch (product) { */ | ||
1952 | /* case 0x00df: */ | ||
1953 | sd->subtype = ThreeComHomeConnectLite; | ||
1954 | /* break; */ | ||
1955 | /* } */ | ||
1956 | break; | ||
1957 | case 0x0733: /* Rebadged ViewQuest (Intel) and ViewQuest cameras */ | ||
1958 | switch (product) { | ||
1959 | case 0x0401: | ||
1960 | sd->subtype = IntelCreateAndShare; | ||
1961 | break; | ||
1962 | case 0x0402: | ||
1963 | sd->subtype = ViewQuestM318B; | ||
1964 | break; | ||
1965 | } | ||
1966 | break; | ||
1967 | case 0x1776: /* Arowana */ | ||
1968 | /* switch (product) { */ | ||
1969 | /* case 0x501c: */ | ||
1970 | sd->subtype = Arowana300KCMOSCamera; | ||
1971 | /* break; */ | ||
1972 | /* } */ | ||
1973 | break; | ||
1974 | } | ||
1975 | cam = &gspca_dev->cam; | 1924 | cam = &gspca_dev->cam; |
1976 | cam->epaddr = 0x01; | 1925 | cam->epaddr = 0x01; |
1977 | cam->cam_mode = vga_mode; | 1926 | cam->cam_mode = vga_mode; |
1978 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; | 1927 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; |
1928 | sd->subtype = id->driver_info; | ||
1979 | sd->brightness = sd_ctrls[MY_BRIGHTNESS].qctrl.default_value; | 1929 | sd->brightness = sd_ctrls[MY_BRIGHTNESS].qctrl.default_value; |
1980 | sd->contrast = sd_ctrls[MY_CONTRAST].qctrl.default_value; | 1930 | sd->contrast = sd_ctrls[MY_CONTRAST].qctrl.default_value; |
1981 | sd->colors = sd_ctrls[MY_COLOR].qctrl.default_value; | 1931 | sd->colors = sd_ctrls[MY_COLOR].qctrl.default_value; |
@@ -2179,15 +2129,14 @@ static const struct sd_desc sd_desc = { | |||
2179 | }; | 2129 | }; |
2180 | 2130 | ||
2181 | /* -- module initialisation -- */ | 2131 | /* -- module initialisation -- */ |
2182 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
2183 | static const __devinitdata struct usb_device_id device_table[] = { | 2132 | static const __devinitdata struct usb_device_id device_table[] = { |
2184 | {USB_DEVICE(0x040a, 0x0002), DVNM("Kodak DVC-325")}, | 2133 | {USB_DEVICE(0x040a, 0x0002), KodakDVC325}, |
2185 | {USB_DEVICE(0x0497, 0xc001), DVNM("Smile International")}, | 2134 | {USB_DEVICE(0x0497, 0xc001), SmileIntlCamera}, |
2186 | {USB_DEVICE(0x0506, 0x00df), DVNM("3Com HomeConnect Lite")}, | 2135 | {USB_DEVICE(0x0506, 0x00df), ThreeComHomeConnectLite}, |
2187 | {USB_DEVICE(0x0733, 0x0401), DVNM("Intel Create and Share")}, | 2136 | {USB_DEVICE(0x0733, 0x0401), IntelCreateAndShare}, |
2188 | {USB_DEVICE(0x0733, 0x0402), DVNM("ViewQuest M318B")}, | 2137 | {USB_DEVICE(0x0733, 0x0402), ViewQuestM318B}, |
2189 | {USB_DEVICE(0x1776, 0x501c), DVNM("Arowana 300K CMOS Camera")}, | 2138 | {USB_DEVICE(0x1776, 0x501c), Arowana300KCMOSCamera}, |
2190 | {USB_DEVICE(0x0000, 0x0000), DVNM("MystFromOri Unknow Camera")}, | 2139 | {USB_DEVICE(0x0000, 0x0000), MystFromOriUnknownCamera}, |
2191 | {} | 2140 | {} |
2192 | }; | 2141 | }; |
2193 | MODULE_DEVICE_TABLE(usb, device_table); | 2142 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/spca505.c b/drivers/media/video/gspca/spca505.c index adff24f503bb..284d549e4d3e 100644 --- a/drivers/media/video/gspca/spca505.c +++ b/drivers/media/video/gspca/spca505.c | |||
@@ -638,32 +638,11 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
638 | { | 638 | { |
639 | struct sd *sd = (struct sd *) gspca_dev; | 639 | struct sd *sd = (struct sd *) gspca_dev; |
640 | struct cam *cam; | 640 | struct cam *cam; |
641 | __u16 vendor; | ||
642 | __u16 product; | ||
643 | |||
644 | vendor = id->idVendor; | ||
645 | product = id->idProduct; | ||
646 | switch (vendor) { | ||
647 | case 0x041e: /* Creative cameras */ | ||
648 | /* switch (product) { */ | ||
649 | /* case 0x401d: * here505b */ | ||
650 | sd->subtype = Nxultra; | ||
651 | /* break; */ | ||
652 | /* } */ | ||
653 | break; | ||
654 | case 0x0733: /* Rebadged ViewQuest (Intel) and ViewQuest cameras */ | ||
655 | /* switch (product) { */ | ||
656 | /* case 0x0430: */ | ||
657 | /* fixme: may be UsbGrabberPV321 BRIDGE_SPCA506 SENSOR_SAA7113 */ | ||
658 | sd->subtype = IntelPCCameraPro; | ||
659 | /* break; */ | ||
660 | /* } */ | ||
661 | break; | ||
662 | } | ||
663 | 641 | ||
664 | cam = &gspca_dev->cam; | 642 | cam = &gspca_dev->cam; |
665 | cam->epaddr = 0x01; | 643 | cam->epaddr = 0x01; |
666 | cam->cam_mode = vga_mode; | 644 | cam->cam_mode = vga_mode; |
645 | sd->subtype = id->driver_info; | ||
667 | if (sd->subtype != IntelPCCameraPro) | 646 | if (sd->subtype != IntelPCCameraPro) |
668 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; | 647 | cam->nmodes = sizeof vga_mode / sizeof vga_mode[0]; |
669 | else /* no 640x480 for IntelPCCameraPro */ | 648 | else /* no 640x480 for IntelPCCameraPro */ |
@@ -906,10 +885,10 @@ static const struct sd_desc sd_desc = { | |||
906 | }; | 885 | }; |
907 | 886 | ||
908 | /* -- module initialisation -- */ | 887 | /* -- module initialisation -- */ |
909 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
910 | static const __devinitdata struct usb_device_id device_table[] = { | 888 | static const __devinitdata struct usb_device_id device_table[] = { |
911 | {USB_DEVICE(0x041e, 0x401d), DVNM("Creative Webcam NX ULTRA")}, | 889 | {USB_DEVICE(0x041e, 0x401d), Nxultra}, |
912 | {USB_DEVICE(0x0733, 0x0430), DVNM("Intel PC Camera Pro")}, | 890 | {USB_DEVICE(0x0733, 0x0430), IntelPCCameraPro}, |
891 | /*fixme: may be UsbGrabberPV321 BRIDGE_SPCA506 SENSOR_SAA7113 */ | ||
913 | {} | 892 | {} |
914 | }; | 893 | }; |
915 | MODULE_DEVICE_TABLE(usb, device_table); | 894 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/spca506.c b/drivers/media/video/gspca/spca506.c index 36dc13c11cbb..2c281a0563e5 100644 --- a/drivers/media/video/gspca/spca506.c +++ b/drivers/media/video/gspca/spca506.c | |||
@@ -800,12 +800,12 @@ static struct sd_desc sd_desc = { | |||
800 | }; | 800 | }; |
801 | 801 | ||
802 | /* -- module initialisation -- */ | 802 | /* -- module initialisation -- */ |
803 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
804 | static __devinitdata struct usb_device_id device_table[] = { | 803 | static __devinitdata struct usb_device_id device_table[] = { |
805 | {USB_DEVICE(0x06e1, 0xa190), DVNM("ADS Instant VCD")}, | 804 | {USB_DEVICE(0x06e1, 0xa190)}, |
806 | /* {USB_DEVICE(0x0733, 0x0430), DVNM("UsbGrabber PV321c")}, */ | 805 | /*fixme: may be IntelPCCameraPro BRIDGE_SPCA505 |
807 | {USB_DEVICE(0x0734, 0x043b), DVNM("3DeMon USB Capture aka")}, | 806 | {USB_DEVICE(0x0733, 0x0430)}, */ |
808 | {USB_DEVICE(0x99fa, 0x8988), DVNM("Grandtec V.cap")}, | 807 | {USB_DEVICE(0x0734, 0x043b)}, |
808 | {USB_DEVICE(0x99fa, 0x8988)}, | ||
809 | {} | 809 | {} |
810 | }; | 810 | }; |
811 | MODULE_DEVICE_TABLE(usb, device_table); | 811 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c index eff5eda70e68..af531d62856c 100644 --- a/drivers/media/video/gspca/spca508.c +++ b/drivers/media/video/gspca/spca508.c | |||
@@ -1473,58 +1473,8 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1473 | { | 1473 | { |
1474 | struct sd *sd = (struct sd *) gspca_dev; | 1474 | struct sd *sd = (struct sd *) gspca_dev; |
1475 | struct cam *cam; | 1475 | struct cam *cam; |
1476 | __u16 product; | ||
1477 | int data1, data2; | 1476 | int data1, data2; |
1478 | 1477 | ||
1479 | product = id->idProduct; | ||
1480 | switch (id->idVendor) { | ||
1481 | case 0x0130: /* Clone webcam */ | ||
1482 | /* switch (product) { */ | ||
1483 | /* case 0x0130: */ | ||
1484 | sd->subtype = HamaUSBSightcam; /* same as Hama 0010 */ | ||
1485 | /* break; */ | ||
1486 | /* } */ | ||
1487 | break; | ||
1488 | case 0x041e: /* Creative cameras */ | ||
1489 | /* switch (product) { */ | ||
1490 | /* case 0x4018: */ | ||
1491 | sd->subtype = CreativeVista; | ||
1492 | /* break; */ | ||
1493 | /* } */ | ||
1494 | break; | ||
1495 | case 0x0461: /* MicroInnovation */ | ||
1496 | /* switch (product) { */ | ||
1497 | /* case 0x0815: */ | ||
1498 | sd->subtype = MicroInnovationIC200; | ||
1499 | /* break; */ | ||
1500 | /* } */ | ||
1501 | break; | ||
1502 | case 0x0733: /* Rebadged ViewQuest (Intel) and ViewQuest cameras */ | ||
1503 | /* switch (product) { */ | ||
1504 | /* case 0x110: */ | ||
1505 | sd->subtype = ViewQuestVQ110; | ||
1506 | /* break; */ | ||
1507 | /* } */ | ||
1508 | break; | ||
1509 | case 0x0af9: /* Hama cameras */ | ||
1510 | switch (product) { | ||
1511 | case 0x0010: | ||
1512 | sd->subtype = HamaUSBSightcam; | ||
1513 | break; | ||
1514 | case 0x0011: | ||
1515 | sd->subtype = HamaUSBSightcam2; | ||
1516 | break; | ||
1517 | } | ||
1518 | break; | ||
1519 | case 0x8086: /* Intel */ | ||
1520 | /* switch (product) { */ | ||
1521 | /* case 0x0110: */ | ||
1522 | sd->subtype = IntelEasyPCCamera; | ||
1523 | /* break; */ | ||
1524 | /* } */ | ||
1525 | break; | ||
1526 | } | ||
1527 | |||
1528 | /* Read from global register the USB product and vendor IDs, just to | 1478 | /* Read from global register the USB product and vendor IDs, just to |
1529 | * prove that we can communicate with the device. This works, which | 1479 | * prove that we can communicate with the device. This works, which |
1530 | * confirms at we are communicating properly and that the device | 1480 | * confirms at we are communicating properly and that the device |
@@ -1544,6 +1494,8 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1544 | cam->epaddr = 0x01; | 1494 | cam->epaddr = 0x01; |
1545 | cam->cam_mode = sif_mode; | 1495 | cam->cam_mode = sif_mode; |
1546 | cam->nmodes = ARRAY_SIZE(sif_mode); | 1496 | cam->nmodes = ARRAY_SIZE(sif_mode); |
1497 | |||
1498 | sd->subtype = id->driver_info; | ||
1547 | sd->brightness = BRIGHTNESS_DEF; | 1499 | sd->brightness = BRIGHTNESS_DEF; |
1548 | 1500 | ||
1549 | switch (sd->subtype) { | 1501 | switch (sd->subtype) { |
@@ -1741,15 +1693,14 @@ static const struct sd_desc sd_desc = { | |||
1741 | }; | 1693 | }; |
1742 | 1694 | ||
1743 | /* -- module initialisation -- */ | 1695 | /* -- module initialisation -- */ |
1744 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
1745 | static const __devinitdata struct usb_device_id device_table[] = { | 1696 | static const __devinitdata struct usb_device_id device_table[] = { |
1746 | {USB_DEVICE(0x0130, 0x0130), DVNM("Clone Digital Webcam 11043")}, | 1697 | {USB_DEVICE(0x0130, 0x0130), HamaUSBSightcam}, |
1747 | {USB_DEVICE(0x041e, 0x4018), DVNM("Creative Webcam Vista (PD1100)")}, | 1698 | {USB_DEVICE(0x041e, 0x4018), CreativeVista}, |
1748 | {USB_DEVICE(0x0461, 0x0815), DVNM("Micro Innovation IC200")}, | 1699 | {USB_DEVICE(0x0461, 0x0815), MicroInnovationIC200}, |
1749 | {USB_DEVICE(0x0733, 0x0110), DVNM("ViewQuest VQ110")}, | 1700 | {USB_DEVICE(0x0733, 0x0110), ViewQuestVQ110}, |
1750 | {USB_DEVICE(0x0af9, 0x0010), DVNM("Hama USB Sightcam 100")}, | 1701 | {USB_DEVICE(0x0af9, 0x0010), HamaUSBSightcam}, |
1751 | {USB_DEVICE(0x0af9, 0x0011), DVNM("Hama USB Sightcam 100")}, | 1702 | {USB_DEVICE(0x0af9, 0x0011), HamaUSBSightcam2}, |
1752 | {USB_DEVICE(0x8086, 0x0110), DVNM("Intel Easy PC Camera")}, | 1703 | {USB_DEVICE(0x8086, 0x0110), IntelEasyPCCamera}, |
1753 | {} | 1704 | {} |
1754 | }; | 1705 | }; |
1755 | MODULE_DEVICE_TABLE(usb, device_table); | 1706 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index 85c37f396aaf..3b46f7dda641 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c | |||
@@ -579,35 +579,15 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
579 | PDEBUG(D_PROBE, "Bad vendor / product from device"); | 579 | PDEBUG(D_PROBE, "Bad vendor / product from device"); |
580 | return -EINVAL; | 580 | return -EINVAL; |
581 | } | 581 | } |
582 | switch (product) { | 582 | |
583 | case 0x0928: | ||
584 | case 0x0929: | ||
585 | case 0x092a: | ||
586 | case 0x092b: | ||
587 | case 0x092c: | ||
588 | case 0x092d: | ||
589 | case 0x092e: | ||
590 | case 0x092f: | ||
591 | case 0x403b: | ||
592 | sd->chip_revision = Rev012A; | ||
593 | break; | ||
594 | default: | ||
595 | /* case 0x0561: | ||
596 | case 0x0815: * ?? in spca508.c | ||
597 | case 0x401a: | ||
598 | case 0x7004: | ||
599 | case 0x7e50: | ||
600 | case 0xa001: | ||
601 | case 0xcdee: */ | ||
602 | sd->chip_revision = Rev072A; | ||
603 | break; | ||
604 | } | ||
605 | cam = &gspca_dev->cam; | 583 | cam = &gspca_dev->cam; |
606 | cam->dev_name = (char *) id->driver_info; | 584 | cam->dev_name = (char *) id->driver_info; |
607 | cam->epaddr = 0x01; | 585 | cam->epaddr = 0x01; |
608 | gspca_dev->nbalt = 7 + 1; /* choose alternate 7 first */ | 586 | gspca_dev->nbalt = 7 + 1; /* choose alternate 7 first */ |
609 | cam->cam_mode = sif_mode; | 587 | cam->cam_mode = sif_mode; |
610 | cam->nmodes = sizeof sif_mode / sizeof sif_mode[0]; | 588 | cam->nmodes = sizeof sif_mode / sizeof sif_mode[0]; |
589 | |||
590 | sd->chip_revision = id->driver_info; | ||
611 | sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value; | 591 | sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value; |
612 | sd->contrast = sd_ctrls[SD_CONTRAST].qctrl.default_value; | 592 | sd->contrast = sd_ctrls[SD_CONTRAST].qctrl.default_value; |
613 | sd->autogain = sd_ctrls[SD_AUTOGAIN].qctrl.default_value; | 593 | sd->autogain = sd_ctrls[SD_AUTOGAIN].qctrl.default_value; |
@@ -994,23 +974,22 @@ static const struct sd_desc sd_desc = { | |||
994 | }; | 974 | }; |
995 | 975 | ||
996 | /* -- module initialisation -- */ | 976 | /* -- module initialisation -- */ |
997 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
998 | static const __devinitdata struct usb_device_id device_table[] = { | 977 | static const __devinitdata struct usb_device_id device_table[] = { |
999 | {USB_DEVICE(0x041e, 0x401a), DVNM("Creative Webcam Vista (PD1100)")}, | 978 | {USB_DEVICE(0x041e, 0x401a), Rev072A}, |
1000 | {USB_DEVICE(0x041e, 0x403b), DVNM("Creative Webcam Vista (VF0010)")}, | 979 | {USB_DEVICE(0x041e, 0x403b), Rev012A}, |
1001 | {USB_DEVICE(0x0458, 0x7004), DVNM("Genius VideoCAM Express V2")}, | 980 | {USB_DEVICE(0x0458, 0x7004), Rev072A}, |
1002 | {USB_DEVICE(0x046d, 0x0928), DVNM("Logitech QC Express Etch2")}, | 981 | {USB_DEVICE(0x046d, 0x0928), Rev012A}, |
1003 | {USB_DEVICE(0x046d, 0x0929), DVNM("Labtec Webcam Elch2")}, | 982 | {USB_DEVICE(0x046d, 0x0929), Rev012A}, |
1004 | {USB_DEVICE(0x046d, 0x092a), DVNM("Logitech QC for Notebook")}, | 983 | {USB_DEVICE(0x046d, 0x092a), Rev012A}, |
1005 | {USB_DEVICE(0x046d, 0x092b), DVNM("Labtec Webcam Plus")}, | 984 | {USB_DEVICE(0x046d, 0x092b), Rev012A}, |
1006 | {USB_DEVICE(0x046d, 0x092c), DVNM("Logitech QC chat Elch2")}, | 985 | {USB_DEVICE(0x046d, 0x092c), Rev012A}, |
1007 | {USB_DEVICE(0x046d, 0x092d), DVNM("Logitech QC Elch2")}, | 986 | {USB_DEVICE(0x046d, 0x092d), Rev012A}, |
1008 | {USB_DEVICE(0x046d, 0x092e), DVNM("Logitech QC Elch2")}, | 987 | {USB_DEVICE(0x046d, 0x092e), Rev012A}, |
1009 | {USB_DEVICE(0x046d, 0x092f), DVNM("Logitech QC Elch2")}, | 988 | {USB_DEVICE(0x046d, 0x092f), Rev012A}, |
1010 | {USB_DEVICE(0x04fc, 0x0561), DVNM("Flexcam 100")}, | 989 | {USB_DEVICE(0x04fc, 0x0561), Rev072A}, |
1011 | {USB_DEVICE(0x060b, 0xa001), DVNM("Maxell Compact Pc PM3")}, | 990 | {USB_DEVICE(0x060b, 0xa001), Rev072A}, |
1012 | {USB_DEVICE(0x10fd, 0x7e50), DVNM("FlyCam Usb 100")}, | 991 | {USB_DEVICE(0x10fd, 0x7e50), Rev072A}, |
1013 | {USB_DEVICE(0xabcd, 0xcdee), DVNM("Petcam")}, | 992 | {USB_DEVICE(0xabcd, 0xcdee), Rev072A}, |
1014 | {} | 993 | {} |
1015 | }; | 994 | }; |
1016 | 995 | ||
diff --git a/drivers/media/video/gspca/stk014.c b/drivers/media/video/gspca/stk014.c index f6390b49f693..16219cf6a6d5 100644 --- a/drivers/media/video/gspca/stk014.c +++ b/drivers/media/video/gspca/stk014.c | |||
@@ -545,9 +545,8 @@ static const struct sd_desc sd_desc = { | |||
545 | }; | 545 | }; |
546 | 546 | ||
547 | /* -- module initialisation -- */ | 547 | /* -- module initialisation -- */ |
548 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
549 | static const __devinitdata struct usb_device_id device_table[] = { | 548 | static const __devinitdata struct usb_device_id device_table[] = { |
550 | {USB_DEVICE(0x05e1, 0x0893), DVNM("Syntek DV4000")}, | 549 | {USB_DEVICE(0x05e1, 0x0893)}, |
551 | {} | 550 | {} |
552 | }; | 551 | }; |
553 | MODULE_DEVICE_TABLE(usb, device_table); | 552 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/sunplus.c b/drivers/media/video/gspca/sunplus.c index 030cb18b3557..54efa48bee01 100644 --- a/drivers/media/video/gspca/sunplus.c +++ b/drivers/media/video/gspca/sunplus.c | |||
@@ -801,228 +801,29 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
801 | struct sd *sd = (struct sd *) gspca_dev; | 801 | struct sd *sd = (struct sd *) gspca_dev; |
802 | struct usb_device *dev = gspca_dev->dev; | 802 | struct usb_device *dev = gspca_dev->dev; |
803 | struct cam *cam; | 803 | struct cam *cam; |
804 | __u16 vendor; | 804 | |
805 | __u16 product; | 805 | cam = &gspca_dev->cam; |
806 | __u8 fw; | 806 | cam->epaddr = 0x01; |
807 | 807 | ||
808 | vendor = id->idVendor; | 808 | sd->bridge = id->driver_info >> 8; |
809 | product = id->idProduct; | 809 | sd->subtype = id->driver_info; |
810 | switch (vendor) { | 810 | |
811 | case 0x041e: /* Creative cameras */ | 811 | if (sd->subtype == AiptekMiniPenCam13) { |
812 | /* switch (product) { */ | ||
813 | /* case 0x400b: */ | ||
814 | /* case 0x4012: */ | ||
815 | /* case 0x4013: */ | ||
816 | /* sd->bridge = BRIDGE_SPCA504C; */ | ||
817 | /* break; */ | ||
818 | /* } */ | ||
819 | break; | ||
820 | case 0x0458: /* Genius KYE cameras */ | ||
821 | /* switch (product) { */ | ||
822 | /* case 0x7006: */ | ||
823 | sd->bridge = BRIDGE_SPCA504B; | ||
824 | /* break; */ | ||
825 | /* } */ | ||
826 | break; | ||
827 | case 0x0461: /* MicroInnovation */ | ||
828 | /* switch (product) { */ | ||
829 | /* case 0x0821: */ | ||
830 | sd->bridge = BRIDGE_SPCA533; | ||
831 | /* break; */ | ||
832 | /* } */ | ||
833 | break; | ||
834 | case 0x046d: /* Logitech Labtec */ | ||
835 | switch (product) { | ||
836 | case 0x0905: | ||
837 | sd->subtype = LogitechClickSmart820; | ||
838 | sd->bridge = BRIDGE_SPCA533; | ||
839 | break; | ||
840 | case 0x0960: | ||
841 | sd->subtype = LogitechClickSmart420; | ||
842 | sd->bridge = BRIDGE_SPCA504C; | ||
843 | break; | ||
844 | } | ||
845 | break; | ||
846 | case 0x0471: /* Philips */ | ||
847 | /* switch (product) { */ | ||
848 | /* case 0x0322: */ | ||
849 | sd->bridge = BRIDGE_SPCA504B; | ||
850 | /* break; */ | ||
851 | /* } */ | ||
852 | break; | ||
853 | case 0x04a5: /* Benq */ | ||
854 | switch (product) { | ||
855 | case 0x3003: | ||
856 | sd->bridge = BRIDGE_SPCA504B; | ||
857 | break; | ||
858 | case 0x3008: | ||
859 | case 0x300a: | ||
860 | sd->bridge = BRIDGE_SPCA533; | ||
861 | break; | ||
862 | } | ||
863 | break; | ||
864 | case 0x04f1: /* JVC */ | ||
865 | /* switch (product) { */ | ||
866 | /* case 0x1001: */ | ||
867 | sd->bridge = BRIDGE_SPCA504B; | ||
868 | /* break; */ | ||
869 | /* } */ | ||
870 | break; | ||
871 | case 0x04fc: /* SunPlus */ | ||
872 | switch (product) { | ||
873 | case 0x500c: | ||
874 | sd->bridge = BRIDGE_SPCA504B; | ||
875 | break; | ||
876 | case 0x504a: | ||
877 | /* try to get the firmware as some cam answer 2.0.1.2.2 | 812 | /* try to get the firmware as some cam answer 2.0.1.2.2 |
878 | * and should be a spca504b then overwrite that setting */ | 813 | * and should be a spca504b then overwrite that setting */ |
879 | reg_r(dev, 0x20, 0, gspca_dev->usb_buf, 1); | 814 | reg_r(dev, 0x20, 0, gspca_dev->usb_buf, 1); |
880 | fw = gspca_dev->usb_buf[0]; | 815 | switch (gspca_dev->usb_buf[0]) { |
881 | if (fw == 1) { | 816 | case 1: |
882 | sd->subtype = AiptekMiniPenCam13; | 817 | break; /* (right bridge/subtype) */ |
883 | sd->bridge = BRIDGE_SPCA504; | 818 | case 2: |
884 | } else if (fw == 2) { | ||
885 | sd->bridge = BRIDGE_SPCA504B; | ||
886 | } else | ||
887 | return -ENODEV; | ||
888 | break; | ||
889 | case 0x504b: | ||
890 | sd->bridge = BRIDGE_SPCA504B; | ||
891 | break; | ||
892 | case 0x5330: | ||
893 | sd->bridge = BRIDGE_SPCA533; | ||
894 | break; | ||
895 | case 0x5360: | ||
896 | sd->bridge = BRIDGE_SPCA536; | ||
897 | break; | ||
898 | case 0xffff: | ||
899 | sd->bridge = BRIDGE_SPCA504B; | ||
900 | break; | ||
901 | } | ||
902 | break; | ||
903 | case 0x052b: /* ?? Megapix */ | ||
904 | /* switch (product) { */ | ||
905 | /* case 0x1513: */ | ||
906 | sd->subtype = MegapixV4; | ||
907 | sd->bridge = BRIDGE_SPCA533; | ||
908 | /* break; */ | ||
909 | /* } */ | ||
910 | break; | ||
911 | case 0x0546: /* Polaroid */ | ||
912 | switch (product) { | ||
913 | case 0x3155: | ||
914 | sd->bridge = BRIDGE_SPCA533; | ||
915 | break; | ||
916 | case 0x3191: | ||
917 | case 0x3273: | ||
918 | sd->bridge = BRIDGE_SPCA504B; | 819 | sd->bridge = BRIDGE_SPCA504B; |
820 | sd->subtype = 0; | ||
919 | break; | 821 | break; |
822 | default: | ||
823 | return -ENODEV; | ||
920 | } | 824 | } |
921 | break; | ||
922 | case 0x055f: /* Mustek cameras */ | ||
923 | switch (product) { | ||
924 | case 0xc211: | ||
925 | sd->bridge = BRIDGE_SPCA536; | ||
926 | break; | ||
927 | case 0xc230: | ||
928 | case 0xc232: | ||
929 | sd->bridge = BRIDGE_SPCA533; | ||
930 | break; | ||
931 | case 0xc360: | ||
932 | sd->bridge = BRIDGE_SPCA536; | ||
933 | break; | ||
934 | case 0xc420: | ||
935 | sd->bridge = BRIDGE_SPCA504; | ||
936 | break; | ||
937 | case 0xc430: | ||
938 | case 0xc440: | ||
939 | sd->bridge = BRIDGE_SPCA533; | ||
940 | break; | ||
941 | case 0xc520: | ||
942 | sd->bridge = BRIDGE_SPCA504; | ||
943 | break; | ||
944 | case 0xc530: | ||
945 | case 0xc540: | ||
946 | case 0xc630: | ||
947 | case 0xc650: | ||
948 | sd->bridge = BRIDGE_SPCA533; | ||
949 | break; | ||
950 | } | ||
951 | break; | ||
952 | case 0x05da: /* Digital Dream cameras */ | ||
953 | /* switch (product) { */ | ||
954 | /* case 0x1018: */ | ||
955 | sd->bridge = BRIDGE_SPCA504B; | ||
956 | /* break; */ | ||
957 | /* } */ | ||
958 | break; | ||
959 | case 0x06d6: /* Trust */ | ||
960 | /* switch (product) { */ | ||
961 | /* case 0x0031: */ | ||
962 | sd->bridge = BRIDGE_SPCA533; /* SPCA533A */ | ||
963 | /* break; */ | ||
964 | /* } */ | ||
965 | break; | ||
966 | case 0x0733: /* Rebadged ViewQuest (Intel) and ViewQuest cameras */ | ||
967 | switch (product) { | ||
968 | case 0x1311: | ||
969 | case 0x1314: | ||
970 | case 0x2211: | ||
971 | case 0x2221: | ||
972 | sd->bridge = BRIDGE_SPCA533; | ||
973 | break; | ||
974 | case 0x3261: | ||
975 | case 0x3281: | ||
976 | sd->bridge = BRIDGE_SPCA536; | ||
977 | break; | ||
978 | } | ||
979 | break; | ||
980 | case 0x08ca: /* Aiptek */ | ||
981 | switch (product) { | ||
982 | case 0x0104: | ||
983 | case 0x0106: | ||
984 | sd->bridge = BRIDGE_SPCA533; | ||
985 | break; | ||
986 | case 0x2008: | ||
987 | sd->bridge = BRIDGE_SPCA504B; | ||
988 | break; | ||
989 | case 0x2010: | ||
990 | sd->bridge = BRIDGE_SPCA533; | ||
991 | break; | ||
992 | case 0x2016: | ||
993 | case 0x2018: | ||
994 | sd->bridge = BRIDGE_SPCA504B; | ||
995 | break; | ||
996 | case 0x2020: | ||
997 | case 0x2022: | ||
998 | sd->bridge = BRIDGE_SPCA533; | ||
999 | break; | ||
1000 | case 0x2024: | ||
1001 | sd->bridge = BRIDGE_SPCA536; | ||
1002 | break; | ||
1003 | case 0x2028: | ||
1004 | sd->bridge = BRIDGE_SPCA533; | ||
1005 | break; | ||
1006 | case 0x2040: | ||
1007 | case 0x2042: | ||
1008 | case 0x2050: | ||
1009 | case 0x2060: | ||
1010 | sd->bridge = BRIDGE_SPCA536; | ||
1011 | break; | ||
1012 | } | ||
1013 | break; | ||
1014 | case 0x0d64: /* SunPlus */ | ||
1015 | /* switch (product) { */ | ||
1016 | /* case 0x0303: */ | ||
1017 | sd->bridge = BRIDGE_SPCA536; | ||
1018 | /* break; */ | ||
1019 | /* } */ | ||
1020 | break; | ||
1021 | } | 825 | } |
1022 | 826 | ||
1023 | cam = &gspca_dev->cam; | ||
1024 | cam->epaddr = 0x01; | ||
1025 | |||
1026 | switch (sd->bridge) { | 827 | switch (sd->bridge) { |
1027 | default: | 828 | default: |
1028 | /* case BRIDGE_SPCA504B: */ | 829 | /* case BRIDGE_SPCA504B: */ |
@@ -1577,65 +1378,67 @@ static const struct sd_desc sd_desc = { | |||
1577 | }; | 1378 | }; |
1578 | 1379 | ||
1579 | /* -- module initialisation -- */ | 1380 | /* -- module initialisation -- */ |
1580 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | 1381 | #define BS(bridge, subtype) \ |
1382 | .driver_info = (BRIDGE_ ## bridge << 8) \ | ||
1383 | | (subtype) | ||
1581 | static const __devinitdata struct usb_device_id device_table[] = { | 1384 | static const __devinitdata struct usb_device_id device_table[] = { |
1582 | {USB_DEVICE(0x041e, 0x400b), DVNM("Creative PC-CAM 600")}, | 1385 | {USB_DEVICE(0x041e, 0x400b), BS(SPCA504C, 0)}, |
1583 | {USB_DEVICE(0x041e, 0x4012), DVNM("PC-Cam350")}, | 1386 | {USB_DEVICE(0x041e, 0x4012), BS(SPCA504C, 0)}, |
1584 | {USB_DEVICE(0x041e, 0x4013), DVNM("Creative Pccam750")}, | 1387 | {USB_DEVICE(0x041e, 0x4013), BS(SPCA504C, 0)}, |
1585 | {USB_DEVICE(0x0458, 0x7006), DVNM("Genius Dsc 1.3 Smart")}, | 1388 | {USB_DEVICE(0x0458, 0x7006), BS(SPCA504B, 0)}, |
1586 | {USB_DEVICE(0x0461, 0x0821), DVNM("Fujifilm MV-1")}, | 1389 | {USB_DEVICE(0x0461, 0x0821), BS(SPCA533, 0)}, |
1587 | {USB_DEVICE(0x046d, 0x0905), DVNM("Logitech ClickSmart 820")}, | 1390 | {USB_DEVICE(0x046d, 0x0905), BS(SPCA533, LogitechClickSmart820)}, |
1588 | {USB_DEVICE(0x046d, 0x0960), DVNM("Logitech ClickSmart 420")}, | 1391 | {USB_DEVICE(0x046d, 0x0960), BS(SPCA504C, LogitechClickSmart420)}, |
1589 | {USB_DEVICE(0x0471, 0x0322), DVNM("Philips DMVC1300K")}, | 1392 | {USB_DEVICE(0x0471, 0x0322), BS(SPCA504B, 0)}, |
1590 | {USB_DEVICE(0x04a5, 0x3003), DVNM("Benq DC 1300")}, | 1393 | {USB_DEVICE(0x04a5, 0x3003), BS(SPCA504B, 0)}, |
1591 | {USB_DEVICE(0x04a5, 0x3008), DVNM("Benq DC 1500")}, | 1394 | {USB_DEVICE(0x04a5, 0x3008), BS(SPCA533, 0)}, |
1592 | {USB_DEVICE(0x04a5, 0x300a), DVNM("Benq DC3410")}, | 1395 | {USB_DEVICE(0x04a5, 0x300a), BS(SPCA533, 0)}, |
1593 | {USB_DEVICE(0x04f1, 0x1001), DVNM("JVC GC A50")}, | 1396 | {USB_DEVICE(0x04f1, 0x1001), BS(SPCA504B, 0)}, |
1594 | {USB_DEVICE(0x04fc, 0x500c), DVNM("Sunplus CA500C")}, | 1397 | {USB_DEVICE(0x04fc, 0x500c), BS(SPCA504B, 0)}, |
1595 | {USB_DEVICE(0x04fc, 0x504a), DVNM("Aiptek Mini PenCam 1.3")}, | 1398 | {USB_DEVICE(0x04fc, 0x504a), BS(SPCA504, AiptekMiniPenCam13)}, |
1596 | {USB_DEVICE(0x04fc, 0x504b), DVNM("Maxell MaxPocket LE 1.3")}, | 1399 | {USB_DEVICE(0x04fc, 0x504b), BS(SPCA504B, 0)}, |
1597 | {USB_DEVICE(0x04fc, 0x5330), DVNM("Digitrex 2110")}, | 1400 | {USB_DEVICE(0x04fc, 0x5330), BS(SPCA533, 0)}, |
1598 | {USB_DEVICE(0x04fc, 0x5360), DVNM("Sunplus Generic")}, | 1401 | {USB_DEVICE(0x04fc, 0x5360), BS(SPCA536, 0)}, |
1599 | {USB_DEVICE(0x04fc, 0xffff), DVNM("Pure DigitalDakota")}, | 1402 | {USB_DEVICE(0x04fc, 0xffff), BS(SPCA504B, 0)}, |
1600 | {USB_DEVICE(0x052b, 0x1513), DVNM("Megapix V4")}, | 1403 | {USB_DEVICE(0x052b, 0x1513), BS(SPCA533, MegapixV4)}, |
1601 | {USB_DEVICE(0x0546, 0x3155), DVNM("Polaroid PDC3070")}, | 1404 | {USB_DEVICE(0x0546, 0x3155), BS(SPCA533, 0)}, |
1602 | {USB_DEVICE(0x0546, 0x3191), DVNM("Polaroid Ion 80")}, | 1405 | {USB_DEVICE(0x0546, 0x3191), BS(SPCA504B, 0)}, |
1603 | {USB_DEVICE(0x0546, 0x3273), DVNM("Polaroid PDC2030")}, | 1406 | {USB_DEVICE(0x0546, 0x3273), BS(SPCA504B, 0)}, |
1604 | {USB_DEVICE(0x055f, 0xc211), DVNM("Kowa Bs888e Microcamera")}, | 1407 | {USB_DEVICE(0x055f, 0xc211), BS(SPCA536, 0)}, |
1605 | {USB_DEVICE(0x055f, 0xc230), DVNM("Mustek Digicam 330K")}, | 1408 | {USB_DEVICE(0x055f, 0xc230), BS(SPCA533, 0)}, |
1606 | {USB_DEVICE(0x055f, 0xc232), DVNM("Mustek MDC3500")}, | 1409 | {USB_DEVICE(0x055f, 0xc232), BS(SPCA533, 0)}, |
1607 | {USB_DEVICE(0x055f, 0xc360), DVNM("Mustek DV4000 Mpeg4 ")}, | 1410 | {USB_DEVICE(0x055f, 0xc360), BS(SPCA536, 0)}, |
1608 | {USB_DEVICE(0x055f, 0xc420), DVNM("Mustek gSmart Mini 2")}, | 1411 | {USB_DEVICE(0x055f, 0xc420), BS(SPCA504, 0)}, |
1609 | {USB_DEVICE(0x055f, 0xc430), DVNM("Mustek Gsmart LCD 2")}, | 1412 | {USB_DEVICE(0x055f, 0xc430), BS(SPCA533, 0)}, |
1610 | {USB_DEVICE(0x055f, 0xc440), DVNM("Mustek DV 3000")}, | 1413 | {USB_DEVICE(0x055f, 0xc440), BS(SPCA533, 0)}, |
1611 | {USB_DEVICE(0x055f, 0xc520), DVNM("Mustek gSmart Mini 3")}, | 1414 | {USB_DEVICE(0x055f, 0xc520), BS(SPCA504, 0)}, |
1612 | {USB_DEVICE(0x055f, 0xc530), DVNM("Mustek Gsmart LCD 3")}, | 1415 | {USB_DEVICE(0x055f, 0xc530), BS(SPCA533, 0)}, |
1613 | {USB_DEVICE(0x055f, 0xc540), DVNM("Gsmart D30")}, | 1416 | {USB_DEVICE(0x055f, 0xc540), BS(SPCA533, 0)}, |
1614 | {USB_DEVICE(0x055f, 0xc630), DVNM("Mustek MDC4000")}, | 1417 | {USB_DEVICE(0x055f, 0xc630), BS(SPCA533, 0)}, |
1615 | {USB_DEVICE(0x055f, 0xc650), DVNM("Mustek MDC5500Z")}, | 1418 | {USB_DEVICE(0x055f, 0xc650), BS(SPCA533, 0)}, |
1616 | {USB_DEVICE(0x05da, 0x1018), DVNM("Digital Dream Enigma 1.3")}, | 1419 | {USB_DEVICE(0x05da, 0x1018), BS(SPCA504B, 0)}, |
1617 | {USB_DEVICE(0x06d6, 0x0031), DVNM("Trust 610 LCD PowerC@m Zoom")}, | 1420 | {USB_DEVICE(0x06d6, 0x0031), BS(SPCA533, 0)}, |
1618 | {USB_DEVICE(0x0733, 0x1311), DVNM("Digital Dream Epsilon 1.3")}, | 1421 | {USB_DEVICE(0x0733, 0x1311), BS(SPCA533, 0)}, |
1619 | {USB_DEVICE(0x0733, 0x1314), DVNM("Mercury 2.1MEG Deluxe Classic Cam")}, | 1422 | {USB_DEVICE(0x0733, 0x1314), BS(SPCA533, 0)}, |
1620 | {USB_DEVICE(0x0733, 0x2211), DVNM("Jenoptik jdc 21 LCD")}, | 1423 | {USB_DEVICE(0x0733, 0x2211), BS(SPCA533, 0)}, |
1621 | {USB_DEVICE(0x0733, 0x2221), DVNM("Mercury Digital Pro 3.1p")}, | 1424 | {USB_DEVICE(0x0733, 0x2221), BS(SPCA533, 0)}, |
1622 | {USB_DEVICE(0x0733, 0x3261), DVNM("Concord 3045 spca536a")}, | 1425 | {USB_DEVICE(0x0733, 0x3261), BS(SPCA536, 0)}, |
1623 | {USB_DEVICE(0x0733, 0x3281), DVNM("Cyberpix S550V")}, | 1426 | {USB_DEVICE(0x0733, 0x3281), BS(SPCA536, 0)}, |
1624 | {USB_DEVICE(0x08ca, 0x0104), DVNM("Aiptek PocketDVII 1.3")}, | 1427 | {USB_DEVICE(0x08ca, 0x0104), BS(SPCA533, 0)}, |
1625 | {USB_DEVICE(0x08ca, 0x0106), DVNM("Aiptek Pocket DV3100+")}, | 1428 | {USB_DEVICE(0x08ca, 0x0106), BS(SPCA533, 0)}, |
1626 | {USB_DEVICE(0x08ca, 0x2008), DVNM("Aiptek Mini PenCam 2 M")}, | 1429 | {USB_DEVICE(0x08ca, 0x2008), BS(SPCA504B, 0)}, |
1627 | {USB_DEVICE(0x08ca, 0x2010), DVNM("Aiptek PocketCam 3M")}, | 1430 | {USB_DEVICE(0x08ca, 0x2010), BS(SPCA533, 0)}, |
1628 | {USB_DEVICE(0x08ca, 0x2016), DVNM("Aiptek PocketCam 2 Mega")}, | 1431 | {USB_DEVICE(0x08ca, 0x2016), BS(SPCA504B, 0)}, |
1629 | {USB_DEVICE(0x08ca, 0x2018), DVNM("Aiptek Pencam SD 2M")}, | 1432 | {USB_DEVICE(0x08ca, 0x2018), BS(SPCA504B, 0)}, |
1630 | {USB_DEVICE(0x08ca, 0x2020), DVNM("Aiptek Slim 3000F")}, | 1433 | {USB_DEVICE(0x08ca, 0x2020), BS(SPCA533, 0)}, |
1631 | {USB_DEVICE(0x08ca, 0x2022), DVNM("Aiptek Slim 3200")}, | 1434 | {USB_DEVICE(0x08ca, 0x2022), BS(SPCA533, 0)}, |
1632 | {USB_DEVICE(0x08ca, 0x2024), DVNM("Aiptek DV3500 Mpeg4 ")}, | 1435 | {USB_DEVICE(0x08ca, 0x2024), BS(SPCA536, 0)}, |
1633 | {USB_DEVICE(0x08ca, 0x2028), DVNM("Aiptek PocketCam4M")}, | 1436 | {USB_DEVICE(0x08ca, 0x2028), BS(SPCA533, 0)}, |
1634 | {USB_DEVICE(0x08ca, 0x2040), DVNM("Aiptek PocketDV4100M")}, | 1437 | {USB_DEVICE(0x08ca, 0x2040), BS(SPCA536, 0)}, |
1635 | {USB_DEVICE(0x08ca, 0x2042), DVNM("Aiptek PocketDV5100")}, | 1438 | {USB_DEVICE(0x08ca, 0x2042), BS(SPCA536, 0)}, |
1636 | {USB_DEVICE(0x08ca, 0x2050), DVNM("Medion MD 41437")}, | 1439 | {USB_DEVICE(0x08ca, 0x2050), BS(SPCA536, 0)}, |
1637 | {USB_DEVICE(0x08ca, 0x2060), DVNM("Aiptek PocketDV5300")}, | 1440 | {USB_DEVICE(0x08ca, 0x2060), BS(SPCA536, 0)}, |
1638 | {USB_DEVICE(0x0d64, 0x0303), DVNM("Sunplus FashionCam DXG")}, | 1441 | {USB_DEVICE(0x0d64, 0x0303), BS(SPCA536, 0)}, |
1639 | {} | 1442 | {} |
1640 | }; | 1443 | }; |
1641 | MODULE_DEVICE_TABLE(usb, device_table); | 1444 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/video/gspca/t613.c index f7ea9a742725..91b555c34c68 100644 --- a/drivers/media/video/gspca/t613.c +++ b/drivers/media/video/gspca/t613.c | |||
@@ -995,9 +995,8 @@ static const struct sd_desc sd_desc = { | |||
995 | }; | 995 | }; |
996 | 996 | ||
997 | /* -- module initialisation -- */ | 997 | /* -- module initialisation -- */ |
998 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
999 | static const __devinitdata struct usb_device_id device_table[] = { | 998 | static const __devinitdata struct usb_device_id device_table[] = { |
1000 | {USB_DEVICE(0x17a1, 0x0128), DVNM("XPX Webcam")}, | 999 | {USB_DEVICE(0x17a1, 0x0128)}, |
1001 | {} | 1000 | {} |
1002 | }; | 1001 | }; |
1003 | MODULE_DEVICE_TABLE(usb, device_table); | 1002 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/tv8532.c b/drivers/media/video/gspca/tv8532.c index b024aca9b102..1ff8ba2f7fe5 100644 --- a/drivers/media/video/gspca/tv8532.c +++ b/drivers/media/video/gspca/tv8532.c | |||
@@ -620,13 +620,12 @@ static const struct sd_desc sd_desc = { | |||
620 | }; | 620 | }; |
621 | 621 | ||
622 | /* -- module initialisation -- */ | 622 | /* -- module initialisation -- */ |
623 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
624 | static const __devinitdata struct usb_device_id device_table[] = { | 623 | static const __devinitdata struct usb_device_id device_table[] = { |
625 | {USB_DEVICE(0x046d, 0x0920), DVNM("QC Express")}, | 624 | {USB_DEVICE(0x046d, 0x0920)}, |
626 | {USB_DEVICE(0x046d, 0x0921), DVNM("Labtec Webcam")}, | 625 | {USB_DEVICE(0x046d, 0x0921)}, |
627 | {USB_DEVICE(0x0545, 0x808b), DVNM("Veo Stingray")}, | 626 | {USB_DEVICE(0x0545, 0x808b)}, |
628 | {USB_DEVICE(0x0545, 0x8333), DVNM("Veo Stingray")}, | 627 | {USB_DEVICE(0x0545, 0x8333)}, |
629 | {USB_DEVICE(0x0923, 0x010f), DVNM("ICM532 cams")}, | 628 | {USB_DEVICE(0x0923, 0x010f)}, |
630 | {} | 629 | {} |
631 | }; | 630 | }; |
632 | 631 | ||
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index 46cff48e6297..5cf1af96d5f5 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -1416,29 +1416,10 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1416 | struct usb_device *dev = gspca_dev->dev; | 1416 | struct usb_device *dev = gspca_dev->dev; |
1417 | struct cam *cam; | 1417 | struct cam *cam; |
1418 | int sensor; | 1418 | int sensor; |
1419 | __u16 product; | ||
1420 | |||
1421 | product = id->idProduct; | ||
1422 | sd->bridge = BRIDGE_VC0321; | ||
1423 | switch (id->idVendor) { | ||
1424 | case 0x0ac8: /* Vimicro z-star */ | ||
1425 | switch (product) { | ||
1426 | case 0x0323: | ||
1427 | sd->bridge = BRIDGE_VC0323; | ||
1428 | break; | ||
1429 | } | ||
1430 | break; | ||
1431 | case 0x17ef: /* Lenovo */ | ||
1432 | /* switch (product) { */ | ||
1433 | /* case 0x4802: * Lenovo MI1310_SOC */ | ||
1434 | sd->bridge = BRIDGE_VC0323; | ||
1435 | /* break; */ | ||
1436 | /* } */ | ||
1437 | break; | ||
1438 | } | ||
1439 | 1419 | ||
1440 | cam = &gspca_dev->cam; | 1420 | cam = &gspca_dev->cam; |
1441 | cam->epaddr = 0x02; | 1421 | cam->epaddr = 0x02; |
1422 | sd->bridge = id->driver_info; | ||
1442 | if (sd->bridge == BRIDGE_VC0321) { | 1423 | if (sd->bridge == BRIDGE_VC0321) { |
1443 | cam->cam_mode = vc0321_mode; | 1424 | cam->cam_mode = vc0321_mode; |
1444 | cam->nmodes = ARRAY_SIZE(vc0321_mode); | 1425 | cam->nmodes = ARRAY_SIZE(vc0321_mode); |
@@ -1767,16 +1748,15 @@ static const struct sd_desc sd_desc = { | |||
1767 | }; | 1748 | }; |
1768 | 1749 | ||
1769 | /* -- module initialisation -- */ | 1750 | /* -- module initialisation -- */ |
1770 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
1771 | static const __devinitdata struct usb_device_id device_table[] = { | 1751 | static const __devinitdata struct usb_device_id device_table[] = { |
1772 | {USB_DEVICE(0x046d, 0x0892), DVNM("Logitech Orbicam")}, | 1752 | {USB_DEVICE(0x046d, 0x0892), BRIDGE_VC0321}, |
1773 | {USB_DEVICE(0x046d, 0x0896), DVNM("Logitech Orbicam")}, | 1753 | {USB_DEVICE(0x046d, 0x0896), BRIDGE_VC0321}, |
1774 | {USB_DEVICE(0x0ac8, 0x0321), DVNM("Vimicro generic vc0321")}, | 1754 | {USB_DEVICE(0x0ac8, 0x0321), BRIDGE_VC0321}, |
1775 | {USB_DEVICE(0x0ac8, 0x0323), DVNM("Vimicro Vc0323")}, | 1755 | {USB_DEVICE(0x0ac8, 0x0323), BRIDGE_VC0323}, |
1776 | {USB_DEVICE(0x0ac8, 0x0328), DVNM("A4Tech PK-130MG")}, | 1756 | {USB_DEVICE(0x0ac8, 0x0328), BRIDGE_VC0321}, |
1777 | {USB_DEVICE(0x0ac8, 0xc001), DVNM("Sony embedded vimicro")}, | 1757 | {USB_DEVICE(0x0ac8, 0xc001), BRIDGE_VC0321}, |
1778 | {USB_DEVICE(0x0ac8, 0xc002), DVNM("Sony embedded vimicro")}, | 1758 | {USB_DEVICE(0x0ac8, 0xc002), BRIDGE_VC0321}, |
1779 | {USB_DEVICE(0x17ef, 0x4802), DVNM("Lenovo Vc0323+MI1310_SOC")}, | 1759 | {USB_DEVICE(0x17ef, 0x4802), BRIDGE_VC0323}, |
1780 | {} | 1760 | {} |
1781 | }; | 1761 | }; |
1782 | MODULE_DEVICE_TABLE(usb, device_table); | 1762 | MODULE_DEVICE_TABLE(usb, device_table); |
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index acd538da0784..257195951a5b 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -7012,31 +7012,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
7012 | 7012 | ||
7013 | /* define some sensors from the vendor/product */ | 7013 | /* define some sensors from the vendor/product */ |
7014 | sd->sharpness = 2; | 7014 | sd->sharpness = 2; |
7015 | sd->sensor = -1; | 7015 | sd->sensor = id->driver_info; |
7016 | switch (id->idVendor) { | ||
7017 | case 0x041e: /* Creative */ | ||
7018 | switch (id->idProduct) { | ||
7019 | case 0x4051: /* zc301 chips */ | ||
7020 | case 0x4053: | ||
7021 | sd->sensor = SENSOR_TAS5130C_VF0250; | ||
7022 | break; | ||
7023 | } | ||
7024 | break; | ||
7025 | case 0x046d: /* Logitech Labtec */ | ||
7026 | switch (id->idProduct) { | ||
7027 | case 0x08dd: | ||
7028 | sd->sensor = SENSOR_MC501CB; | ||
7029 | break; | ||
7030 | } | ||
7031 | break; | ||
7032 | case 0x0ac8: /* Vimicro z-star */ | ||
7033 | switch (id->idProduct) { | ||
7034 | case 0x305b: | ||
7035 | sd->sensor = SENSOR_TAS5130C_VF0250; | ||
7036 | break; | ||
7037 | } | ||
7038 | break; | ||
7039 | } | ||
7040 | sensor = zcxx_probeSensor(gspca_dev); | 7016 | sensor = zcxx_probeSensor(gspca_dev); |
7041 | if (sensor >= 0) | 7017 | if (sensor >= 0) |
7042 | PDEBUG(D_PROBE, "probe sensor -> %02x", sensor); | 7018 | PDEBUG(D_PROBE, "probe sensor -> %02x", sensor); |
@@ -7522,70 +7498,69 @@ static const struct sd_desc sd_desc = { | |||
7522 | .querymenu = sd_querymenu, | 7498 | .querymenu = sd_querymenu, |
7523 | }; | 7499 | }; |
7524 | 7500 | ||
7525 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
7526 | static const __devinitdata struct usb_device_id device_table[] = { | 7501 | static const __devinitdata struct usb_device_id device_table[] = { |
7527 | {USB_DEVICE(0x041e, 0x041e), DVNM("Creative WebCam Live!")}, | 7502 | {USB_DEVICE(0x041e, 0x041e)}, |
7528 | #ifndef CONFIG_USB_ZC0301 | 7503 | #ifndef CONFIG_USB_ZC0301 |
7529 | {USB_DEVICE(0x041e, 0x4017), DVNM("Creative Webcam Mobile PD1090")}, | 7504 | {USB_DEVICE(0x041e, 0x4017)}, |
7530 | {USB_DEVICE(0x041e, 0x401c), DVNM("Creative NX")}, | 7505 | {USB_DEVICE(0x041e, 0x401c)}, |
7531 | {USB_DEVICE(0x041e, 0x401e), DVNM("Creative Nx Pro")}, | 7506 | {USB_DEVICE(0x041e, 0x401e)}, |
7532 | {USB_DEVICE(0x041e, 0x401f), DVNM("Creative Webcam Notebook PD1171")}, | 7507 | {USB_DEVICE(0x041e, 0x401f)}, |
7533 | #endif | 7508 | #endif |
7534 | {USB_DEVICE(0x041e, 0x4029), DVNM("Creative WebCam Vista Pro")}, | 7509 | {USB_DEVICE(0x041e, 0x4029)}, |
7535 | #ifndef CONFIG_USB_ZC0301 | 7510 | #ifndef CONFIG_USB_ZC0301 |
7536 | {USB_DEVICE(0x041e, 0x4034), DVNM("Creative Instant P0620")}, | 7511 | {USB_DEVICE(0x041e, 0x4034)}, |
7537 | {USB_DEVICE(0x041e, 0x4035), DVNM("Creative Instant P0620D")}, | 7512 | {USB_DEVICE(0x041e, 0x4035)}, |
7538 | {USB_DEVICE(0x041e, 0x4036), DVNM("Creative Live !")}, | 7513 | {USB_DEVICE(0x041e, 0x4036)}, |
7539 | {USB_DEVICE(0x041e, 0x403a), DVNM("Creative Nx Pro 2")}, | 7514 | {USB_DEVICE(0x041e, 0x403a)}, |
7540 | #endif | 7515 | #endif |
7541 | {USB_DEVICE(0x041e, 0x4051), DVNM("Creative Notebook Pro (VF0250)")}, | 7516 | {USB_DEVICE(0x041e, 0x4051), SENSOR_TAS5130C_VF0250}, |
7542 | {USB_DEVICE(0x041e, 0x4053), DVNM("Creative Live!Cam Video IM")}, | 7517 | {USB_DEVICE(0x041e, 0x4053), SENSOR_TAS5130C_VF0250}, |
7543 | #ifndef CONFIG_USB_ZC0301 | 7518 | #ifndef CONFIG_USB_ZC0301 |
7544 | {USB_DEVICE(0x0458, 0x7007), DVNM("Genius VideoCam V2")}, | 7519 | {USB_DEVICE(0x0458, 0x7007)}, |
7545 | {USB_DEVICE(0x0458, 0x700c), DVNM("Genius VideoCam V3")}, | 7520 | {USB_DEVICE(0x0458, 0x700c)}, |
7546 | {USB_DEVICE(0x0458, 0x700f), DVNM("Genius VideoCam Web V2")}, | 7521 | {USB_DEVICE(0x0458, 0x700f)}, |
7547 | #endif | 7522 | #endif |
7548 | {USB_DEVICE(0x0461, 0x0a00), DVNM("MicroInnovation WebCam320")}, | 7523 | {USB_DEVICE(0x0461, 0x0a00)}, |
7549 | {USB_DEVICE(0x046d, 0x08a0), DVNM("Logitech QC IM")}, | 7524 | {USB_DEVICE(0x046d, 0x08a0)}, |
7550 | {USB_DEVICE(0x046d, 0x08a1), DVNM("Logitech QC IM 0x08A1 +sound")}, | 7525 | {USB_DEVICE(0x046d, 0x08a1)}, |
7551 | {USB_DEVICE(0x046d, 0x08a2), DVNM("Labtec Webcam Pro")}, | 7526 | {USB_DEVICE(0x046d, 0x08a2)}, |
7552 | {USB_DEVICE(0x046d, 0x08a3), DVNM("Logitech QC Chat")}, | 7527 | {USB_DEVICE(0x046d, 0x08a3)}, |
7553 | {USB_DEVICE(0x046d, 0x08a6), DVNM("Logitech QCim")}, | 7528 | {USB_DEVICE(0x046d, 0x08a6)}, |
7554 | {USB_DEVICE(0x046d, 0x08a7), DVNM("Logitech QuickCam Image")}, | 7529 | {USB_DEVICE(0x046d, 0x08a7)}, |
7555 | {USB_DEVICE(0x046d, 0x08a9), DVNM("Logitech Notebook Deluxe")}, | 7530 | {USB_DEVICE(0x046d, 0x08a9)}, |
7556 | {USB_DEVICE(0x046d, 0x08aa), DVNM("Labtec Webcam Notebook")}, | 7531 | {USB_DEVICE(0x046d, 0x08aa)}, |
7557 | {USB_DEVICE(0x046d, 0x08ac), DVNM("Logitech QuickCam Cool")}, | 7532 | {USB_DEVICE(0x046d, 0x08ac)}, |
7558 | {USB_DEVICE(0x046d, 0x08ad), DVNM("Logitech QCCommunicate STX")}, | 7533 | {USB_DEVICE(0x046d, 0x08ad)}, |
7559 | #ifndef CONFIG_USB_ZC0301 | 7534 | #ifndef CONFIG_USB_ZC0301 |
7560 | {USB_DEVICE(0x046d, 0x08ae), DVNM("Logitech QuickCam for Notebooks")}, | 7535 | {USB_DEVICE(0x046d, 0x08ae)}, |
7561 | #endif | 7536 | #endif |
7562 | {USB_DEVICE(0x046d, 0x08af), DVNM("Logitech QuickCam Cool")}, | 7537 | {USB_DEVICE(0x046d, 0x08af)}, |
7563 | {USB_DEVICE(0x046d, 0x08b9), DVNM("Logitech QC IM ???")}, | 7538 | {USB_DEVICE(0x046d, 0x08b9)}, |
7564 | {USB_DEVICE(0x046d, 0x08d7), DVNM("Logitech QCam STX")}, | 7539 | {USB_DEVICE(0x046d, 0x08d7)}, |
7565 | {USB_DEVICE(0x046d, 0x08d9), DVNM("Logitech QuickCam IM/Connect")}, | 7540 | {USB_DEVICE(0x046d, 0x08d9)}, |
7566 | {USB_DEVICE(0x046d, 0x08d8), DVNM("Logitech Notebook Deluxe")}, | 7541 | {USB_DEVICE(0x046d, 0x08d8)}, |
7567 | {USB_DEVICE(0x046d, 0x08da), DVNM("Logitech QuickCam Messenger")}, | 7542 | {USB_DEVICE(0x046d, 0x08da)}, |
7568 | {USB_DEVICE(0x046d, 0x08dd), DVNM("Logitech QuickCam for Notebooks")}, | 7543 | {USB_DEVICE(0x046d, 0x08dd), SENSOR_MC501CB}, |
7569 | {USB_DEVICE(0x0471, 0x0325), DVNM("Philips SPC 200 NC")}, | 7544 | {USB_DEVICE(0x0471, 0x0325)}, |
7570 | {USB_DEVICE(0x0471, 0x0326), DVNM("Philips SPC 300 NC")}, | 7545 | {USB_DEVICE(0x0471, 0x0326)}, |
7571 | {USB_DEVICE(0x0471, 0x032d), DVNM("Philips spc210nc")}, | 7546 | {USB_DEVICE(0x0471, 0x032d)}, |
7572 | {USB_DEVICE(0x0471, 0x032e), DVNM("Philips spc315nc")}, | 7547 | {USB_DEVICE(0x0471, 0x032e)}, |
7573 | {USB_DEVICE(0x055f, 0xc005), DVNM("Mustek Wcam300A")}, | 7548 | {USB_DEVICE(0x055f, 0xc005)}, |
7574 | #ifndef CONFIG_USB_ZC0301 | 7549 | #ifndef CONFIG_USB_ZC0301 |
7575 | {USB_DEVICE(0x055f, 0xd003), DVNM("Mustek WCam300A")}, | 7550 | {USB_DEVICE(0x055f, 0xd003)}, |
7576 | {USB_DEVICE(0x055f, 0xd004), DVNM("Mustek WCam300 AN")}, | 7551 | {USB_DEVICE(0x055f, 0xd004)}, |
7577 | #endif | 7552 | #endif |
7578 | {USB_DEVICE(0x0698, 0x2003), DVNM("CTX M730V built in")}, | 7553 | {USB_DEVICE(0x0698, 0x2003)}, |
7579 | {USB_DEVICE(0x0ac8, 0x0302), DVNM("Z-star Vimicro zc0302")}, | 7554 | {USB_DEVICE(0x0ac8, 0x0302)}, |
7580 | #ifndef CONFIG_USB_ZC0301 | 7555 | #ifndef CONFIG_USB_ZC0301 |
7581 | {USB_DEVICE(0x0ac8, 0x301b), DVNM("Z-Star zc301b")}, | 7556 | {USB_DEVICE(0x0ac8, 0x301b)}, |
7582 | {USB_DEVICE(0x0ac8, 0x303b), DVNM("Vimicro 0x303b")}, | 7557 | {USB_DEVICE(0x0ac8, 0x303b)}, |
7583 | #endif | 7558 | #endif |
7584 | {USB_DEVICE(0x0ac8, 0x305b), DVNM("Z-star Vimicro zc0305b")}, | 7559 | {USB_DEVICE(0x0ac8, 0x305b), SENSOR_TAS5130C_VF0250}, |
7585 | #ifndef CONFIG_USB_ZC0301 | 7560 | #ifndef CONFIG_USB_ZC0301 |
7586 | {USB_DEVICE(0x0ac8, 0x307b), DVNM("Z-Star 307b")}, | 7561 | {USB_DEVICE(0x0ac8, 0x307b)}, |
7587 | {USB_DEVICE(0x10fd, 0x0128), DVNM("Typhoon Webshot II 300k 0x0128")}, | 7562 | {USB_DEVICE(0x10fd, 0x0128)}, |
7588 | {USB_DEVICE(0x10fd, 0x8050), DVNM("Typhoon Webshot II USB 300k")}, | 7563 | {USB_DEVICE(0x10fd, 0x8050)}, |
7589 | #endif | 7564 | #endif |
7590 | {} /* end of entry */ | 7565 | {} /* end of entry */ |
7591 | }; | 7566 | }; |