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/spca505.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/spca505.c')
-rw-r--r-- | drivers/media/video/gspca/spca505.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/drivers/media/video/gspca/spca505.c b/drivers/media/video/gspca/spca505.c index adff24f503b..284d549e4d3 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); |