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/spca561.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/spca561.c')
-rw-r--r-- | drivers/media/video/gspca/spca561.c | 57 |
1 files changed, 18 insertions, 39 deletions
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 | ||