aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/spca501.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/spca501.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/spca501.c')
-rw-r--r--drivers/media/video/gspca/spca501.c69
1 files changed, 9 insertions, 60 deletions
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
2183static const __devinitdata struct usb_device_id device_table[] = { 2132static 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};
2193MODULE_DEVICE_TABLE(usb, device_table); 2142MODULE_DEVICE_TABLE(usb, device_table);