aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/spca505.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-25 08:53:03 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 11:06:38 -0300
commit9d64fdb15b1b9ce9144cfde4001e9194ccde42d1 (patch)
treeda578050af9867c0247b55099b4e7337f8fea2b4 /drivers/media/video/gspca/spca505.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/spca505.c')
-rw-r--r--drivers/media/video/gspca/spca505.c29
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,
{
struct sd *sd = (struct sd *) gspca_dev;
struct cam *cam;
- __u16 vendor;
- __u16 product;
-
- vendor = id->idVendor;
- product = id->idProduct;
- switch (vendor) {
- case 0x041e: /* Creative cameras */
-/* switch (product) { */
-/* case 0x401d: * here505b */
- sd->subtype = Nxultra;
-/* break; */
-/* } */
- break;
- case 0x0733: /* Rebadged ViewQuest (Intel) and ViewQuest cameras */
-/* switch (product) { */
-/* case 0x0430: */
-/* fixme: may be UsbGrabberPV321 BRIDGE_SPCA506 SENSOR_SAA7113 */
- sd->subtype = IntelPCCameraPro;
-/* break; */
-/* } */
- break;
- }
cam = &gspca_dev->cam;
cam->epaddr = 0x01;
cam->cam_mode = vga_mode;
+ sd->subtype = id->driver_info;
if (sd->subtype != IntelPCCameraPro)
cam->nmodes = sizeof vga_mode / sizeof vga_mode[0];
else /* no 640x480 for IntelPCCameraPro */
@@ -906,10 +885,10 @@ static const struct sd_desc sd_desc = {
};
/* -- module initialisation -- */
-#define DVNM(name) .driver_info = (kernel_ulong_t) name
static const __devinitdata struct usb_device_id device_table[] = {
- {USB_DEVICE(0x041e, 0x401d), DVNM("Creative Webcam NX ULTRA")},
- {USB_DEVICE(0x0733, 0x0430), DVNM("Intel PC Camera Pro")},
+ {USB_DEVICE(0x041e, 0x401d), Nxultra},
+ {USB_DEVICE(0x0733, 0x0430), IntelPCCameraPro},
+/*fixme: may be UsbGrabberPV321 BRIDGE_SPCA506 SENSOR_SAA7113 */
{}
};
MODULE_DEVICE_TABLE(usb, device_table);