summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/gspca/etoms.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-25 13:53:03 +0200
committerJean-Francois Moine <moinejf@free.fr>2008-07-25 13:53:03 +0200
commit838a44104a792f93926bbf9f69e90b6f84c1ddb3 (patch)
tree618deb472e501f0279306bece13b6e5705efe7de /linux/drivers/media/video/gspca/etoms.c
parentb85c5b4a6559eafcf3ad4253b97ae6cb1428ab97 (diff)
downloadmediapointer-dvb-s2-838a44104a792f93926bbf9f69e90b6f84c1ddb3.tar.gz
mediapointer-dvb-s2-838a44104a792f93926bbf9f69e90b6f84c1ddb3.tar.bz2
gspca: Set the specific per webcam information in driver_info.
From: Jean-Francois Moine <moinejf@free.fr> This patch removes a big part of the code run at probe time. Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca/etoms.c')
-rw-r--r--linux/drivers/media/video/gspca/etoms.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/linux/drivers/media/video/gspca/etoms.c b/linux/drivers/media/video/gspca/etoms.c
index 3f64b04a8..4e15e7dff 100644
--- a/linux/drivers/media/video/gspca/etoms.c
+++ b/linux/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];
@@ -913,12 +898,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},
{}
};