aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/spca508.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-25 07:53:03 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-27 10:06:38 -0400
commit9d64fdb15b1b9ce9144cfde4001e9194ccde42d1 (patch)
treeda578050af9867c0247b55099b4e7337f8fea2b4 /drivers/media/video/gspca/spca508.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/spca508.c')
-rw-r--r--drivers/media/video/gspca/spca508.c67
1 files changed, 9 insertions, 58 deletions
diff --git a/drivers/media/video/gspca/spca508.c b/drivers/media/video/gspca/spca508.c
index eff5eda70e68..af531d62856c 100644
--- a/drivers/media/video/gspca/spca508.c
+++ b/drivers/media/video/gspca/spca508.c
@@ -1473,58 +1473,8 @@ static int sd_config(struct gspca_dev *gspca_dev,
1473{ 1473{
1474 struct sd *sd = (struct sd *) gspca_dev; 1474 struct sd *sd = (struct sd *) gspca_dev;
1475 struct cam *cam; 1475 struct cam *cam;
1476 __u16 product;
1477 int data1, data2; 1476 int data1, data2;
1478 1477
1479 product = id->idProduct;
1480 switch (id->idVendor) {
1481 case 0x0130: /* Clone webcam */
1482/* switch (product) { */
1483/* case 0x0130: */
1484 sd->subtype = HamaUSBSightcam; /* same as Hama 0010 */
1485/* break; */
1486/* } */
1487 break;
1488 case 0x041e: /* Creative cameras */
1489/* switch (product) { */
1490/* case 0x4018: */
1491 sd->subtype = CreativeVista;
1492/* break; */
1493/* } */
1494 break;
1495 case 0x0461: /* MicroInnovation */
1496/* switch (product) { */
1497/* case 0x0815: */
1498 sd->subtype = MicroInnovationIC200;
1499/* break; */
1500/* } */
1501 break;
1502 case 0x0733: /* Rebadged ViewQuest (Intel) and ViewQuest cameras */
1503/* switch (product) { */
1504/* case 0x110: */
1505 sd->subtype = ViewQuestVQ110;
1506/* break; */
1507/* } */
1508 break;
1509 case 0x0af9: /* Hama cameras */
1510 switch (product) {
1511 case 0x0010:
1512 sd->subtype = HamaUSBSightcam;
1513 break;
1514 case 0x0011:
1515 sd->subtype = HamaUSBSightcam2;
1516 break;
1517 }
1518 break;
1519 case 0x8086: /* Intel */
1520/* switch (product) { */
1521/* case 0x0110: */
1522 sd->subtype = IntelEasyPCCamera;
1523/* break; */
1524/* } */
1525 break;
1526 }
1527
1528 /* Read from global register the USB product and vendor IDs, just to 1478 /* Read from global register the USB product and vendor IDs, just to
1529 * prove that we can communicate with the device. This works, which 1479 * prove that we can communicate with the device. This works, which
1530 * confirms at we are communicating properly and that the device 1480 * confirms at we are communicating properly and that the device
@@ -1544,6 +1494,8 @@ static int sd_config(struct gspca_dev *gspca_dev,
1544 cam->epaddr = 0x01; 1494 cam->epaddr = 0x01;
1545 cam->cam_mode = sif_mode; 1495 cam->cam_mode = sif_mode;
1546 cam->nmodes = ARRAY_SIZE(sif_mode); 1496 cam->nmodes = ARRAY_SIZE(sif_mode);
1497
1498 sd->subtype = id->driver_info;
1547 sd->brightness = BRIGHTNESS_DEF; 1499 sd->brightness = BRIGHTNESS_DEF;
1548 1500
1549 switch (sd->subtype) { 1501 switch (sd->subtype) {
@@ -1741,15 +1693,14 @@ static const struct sd_desc sd_desc = {
1741}; 1693};
1742 1694
1743/* -- module initialisation -- */ 1695/* -- module initialisation -- */
1744#define DVNM(name) .driver_info = (kernel_ulong_t) name
1745static const __devinitdata struct usb_device_id device_table[] = { 1696static const __devinitdata struct usb_device_id device_table[] = {
1746 {USB_DEVICE(0x0130, 0x0130), DVNM("Clone Digital Webcam 11043")}, 1697 {USB_DEVICE(0x0130, 0x0130), HamaUSBSightcam},
1747 {USB_DEVICE(0x041e, 0x4018), DVNM("Creative Webcam Vista (PD1100)")}, 1698 {USB_DEVICE(0x041e, 0x4018), CreativeVista},
1748 {USB_DEVICE(0x0461, 0x0815), DVNM("Micro Innovation IC200")}, 1699 {USB_DEVICE(0x0461, 0x0815), MicroInnovationIC200},
1749 {USB_DEVICE(0x0733, 0x0110), DVNM("ViewQuest VQ110")}, 1700 {USB_DEVICE(0x0733, 0x0110), ViewQuestVQ110},
1750 {USB_DEVICE(0x0af9, 0x0010), DVNM("Hama USB Sightcam 100")}, 1701 {USB_DEVICE(0x0af9, 0x0010), HamaUSBSightcam},
1751 {USB_DEVICE(0x0af9, 0x0011), DVNM("Hama USB Sightcam 100")}, 1702 {USB_DEVICE(0x0af9, 0x0011), HamaUSBSightcam2},
1752 {USB_DEVICE(0x8086, 0x0110), DVNM("Intel Easy PC Camera")}, 1703 {USB_DEVICE(0x8086, 0x0110), IntelEasyPCCamera},
1753 {} 1704 {}
1754}; 1705};
1755MODULE_DEVICE_TABLE(usb, device_table); 1706MODULE_DEVICE_TABLE(usb, device_table);