aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/etoms.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/etoms.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/etoms.c')
-rw-r--r--drivers/media/video/gspca/etoms.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/media/video/gspca/etoms.c b/drivers/media/video/gspca/etoms.c
index 7529bb0bf6f..c8c2f02fcf0 100644
--- a/drivers/media/video/gspca/etoms.c
+++ b/drivers/media/video/gspca/etoms.c
@@ -599,25 +599,10 @@ 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 0x102c: * Etoms */
- switch (product) {
- case 0x6151:
- sd->sensor = SENSOR_PAS106; /* Etoms61x151 */
- break;
- case 0x6251:
- sd->sensor = SENSOR_TAS5130CXX; /* Etoms61x251 */
- break;
-/* } */
-/* break; */
- }
+
cam = &gspca_dev->cam;
cam->epaddr = 1;
+ sd->sensor = id->driver_info;
if (sd->sensor == SENSOR_PAS106) {
cam->cam_mode = sif_mode;
cam->nmodes = sizeof sif_mode / sizeof sif_mode[0];
@@ -907,12 +892,11 @@ static struct sd_desc sd_desc = {
};
/* -- module initialisation -- */
-#define DVNM(name) .driver_info = (kernel_ulong_t) name
static __devinitdata struct usb_device_id device_table[] = {
#ifndef CONFIG_USB_ET61X251
- {USB_DEVICE(0x102c, 0x6151), DVNM("Qcam Sangha CIF")},
+ {USB_DEVICE(0x102c, 0x6151), .driver_info = SENSOR_PAS106},
#endif
- {USB_DEVICE(0x102c, 0x6251), DVNM("Qcam xxxxxx VGA")},
+ {USB_DEVICE(0x102c, 0x6251), .driver_info = SENSOR_TAS5130CXX},
{}
};