diff options
Diffstat (limited to 'drivers/media/video/gspca/spca501.c')
-rw-r--r-- | drivers/media/video/gspca/spca501.c | 75 |
1 files changed, 10 insertions, 65 deletions
diff --git a/drivers/media/video/gspca/spca501.c b/drivers/media/video/gspca/spca501.c index 50e929de0203..51a3c3429ef0 100644 --- a/drivers/media/video/gspca/spca501.c +++ b/drivers/media/video/gspca/spca501.c | |||
@@ -23,9 +23,6 @@ | |||
23 | 23 | ||
24 | #include "gspca.h" | 24 | #include "gspca.h" |
25 | 25 | ||
26 | #define DRIVER_VERSION_NUMBER KERNEL_VERSION(2, 1, 7) | ||
27 | static const char version[] = "2.1.7"; | ||
28 | |||
29 | MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); | 26 | MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>"); |
30 | MODULE_DESCRIPTION("GSPCA/SPCA501 USB Camera Driver"); | 27 | MODULE_DESCRIPTION("GSPCA/SPCA501 USB Camera Driver"); |
31 | MODULE_LICENSE("GPL"); | 28 | MODULE_LICENSE("GPL"); |
@@ -1923,63 +1920,12 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
1923 | { | 1920 | { |
1924 | struct sd *sd = (struct sd *) gspca_dev; | 1921 | struct sd *sd = (struct sd *) gspca_dev; |
1925 | struct cam *cam; | 1922 | struct cam *cam; |
1926 | __u16 vendor; | 1923 | |
1927 | __u16 product; | ||
1928 | |||
1929 | vendor = id->idVendor; | ||
1930 | product = id->idProduct; | ||
1931 | switch (vendor) { | ||
1932 | case 0x0000: /* Unknow Camera */ | ||
1933 | /* switch (product) { */ | ||
1934 | /* case 0x0000: */ | ||
1935 | sd->subtype = MystFromOriUnknownCamera; | ||
1936 | /* break; */ | ||
1937 | /* } */ | ||
1938 | break; | ||
1939 | case 0x040a: /* Kodak cameras */ | ||
1940 | /* switch (product) { */ | ||
1941 | /* case 0x0002: */ | ||
1942 | sd->subtype = KodakDVC325; | ||
1943 | /* break; */ | ||
1944 | /* } */ | ||
1945 | break; | ||
1946 | case 0x0497: /* Smile International */ | ||
1947 | /* switch (product) { */ | ||
1948 | /* case 0xc001: */ | ||
1949 | sd->subtype = SmileIntlCamera; | ||
1950 | /* break; */ | ||
1951 | /* } */ | ||
1952 | break; | ||
1953 | case 0x0506: /* 3COM cameras */ | ||
1954 | /* switch (product) { */ | ||
1955 | /* case 0x00df: */ | ||
1956 | sd->subtype = ThreeComHomeConnectLite; | ||
1957 | /* break; */ | ||
1958 | /* } */ | ||
1959 | break; | ||
1960 | case 0x0733: /* Rebadged ViewQuest (Intel) and ViewQuest cameras */ | ||
1961 | switch (product) { | ||
1962 | case 0x0401: | ||
1963 | sd->subtype = IntelCreateAndShare; | ||
1964 | break; | ||
1965 | case 0x0402: | ||
1966 | sd->subtype = ViewQuestM318B; | ||
1967 | break; | ||
1968 | } | ||
1969 | break; | ||
1970 | case 0x1776: /* Arowana */ | ||
1971 | /* switch (product) { */ | ||
1972 | /* case 0x501c: */ | ||
1973 | sd->subtype = Arowana300KCMOSCamera; | ||
1974 | /* break; */ | ||
1975 | /* } */ | ||
1976 | break; | ||
1977 | } | ||
1978 | cam = &gspca_dev->cam; | 1924 | cam = &gspca_dev->cam; |
1979 | cam->dev_name = (char *) id->driver_info; | ||
1980 | cam->epaddr = 0x01; | 1925 | cam->epaddr = 0x01; |
1981 | cam->cam_mode = vga_mode; | 1926 | cam->cam_mode = vga_mode; |
1982 | 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; | ||
1983 | sd->brightness = sd_ctrls[MY_BRIGHTNESS].qctrl.default_value; | 1929 | sd->brightness = sd_ctrls[MY_BRIGHTNESS].qctrl.default_value; |
1984 | sd->contrast = sd_ctrls[MY_CONTRAST].qctrl.default_value; | 1930 | sd->contrast = sd_ctrls[MY_CONTRAST].qctrl.default_value; |
1985 | sd->colors = sd_ctrls[MY_COLOR].qctrl.default_value; | 1931 | sd->colors = sd_ctrls[MY_COLOR].qctrl.default_value; |
@@ -2183,15 +2129,14 @@ static const struct sd_desc sd_desc = { | |||
2183 | }; | 2129 | }; |
2184 | 2130 | ||
2185 | /* -- module initialisation -- */ | 2131 | /* -- module initialisation -- */ |
2186 | #define DVNM(name) .driver_info = (kernel_ulong_t) name | ||
2187 | static const __devinitdata struct usb_device_id device_table[] = { | 2132 | static const __devinitdata struct usb_device_id device_table[] = { |
2188 | {USB_DEVICE(0x040a, 0x0002), DVNM("Kodak DVC-325")}, | 2133 | {USB_DEVICE(0x040a, 0x0002), .driver_info = KodakDVC325}, |
2189 | {USB_DEVICE(0x0497, 0xc001), DVNM("Smile International")}, | 2134 | {USB_DEVICE(0x0497, 0xc001), .driver_info = SmileIntlCamera}, |
2190 | {USB_DEVICE(0x0506, 0x00df), DVNM("3Com HomeConnect Lite")}, | 2135 | {USB_DEVICE(0x0506, 0x00df), .driver_info = ThreeComHomeConnectLite}, |
2191 | {USB_DEVICE(0x0733, 0x0401), DVNM("Intel Create and Share")}, | 2136 | {USB_DEVICE(0x0733, 0x0401), .driver_info = IntelCreateAndShare}, |
2192 | {USB_DEVICE(0x0733, 0x0402), DVNM("ViewQuest M318B")}, | 2137 | {USB_DEVICE(0x0733, 0x0402), .driver_info = ViewQuestM318B}, |
2193 | {USB_DEVICE(0x1776, 0x501c), DVNM("Arowana 300K CMOS Camera")}, | 2138 | {USB_DEVICE(0x1776, 0x501c), .driver_info = Arowana300KCMOSCamera}, |
2194 | {USB_DEVICE(0x0000, 0x0000), DVNM("MystFromOri Unknow Camera")}, | 2139 | {USB_DEVICE(0x0000, 0x0000), .driver_info = MystFromOriUnknownCamera}, |
2195 | {} | 2140 | {} |
2196 | }; | 2141 | }; |
2197 | MODULE_DEVICE_TABLE(usb, device_table); | 2142 | MODULE_DEVICE_TABLE(usb, device_table); |
@@ -2216,7 +2161,7 @@ static int __init sd_mod_init(void) | |||
2216 | { | 2161 | { |
2217 | if (usb_register(&sd_driver) < 0) | 2162 | if (usb_register(&sd_driver) < 0) |
2218 | return -1; | 2163 | return -1; |
2219 | PDEBUG(D_PROBE, "v%s registered", version); | 2164 | PDEBUG(D_PROBE, "registered"); |
2220 | return 0; | 2165 | return 0; |
2221 | } | 2166 | } |
2222 | static void __exit sd_mod_exit(void) | 2167 | static void __exit sd_mod_exit(void) |