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/zc3xx.c | |
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/zc3xx.c')
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 125 |
1 files changed, 50 insertions, 75 deletions
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 | }; |