aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/vc032x.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/vc032x.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/vc032x.c')
-rw-r--r--drivers/media/video/gspca/vc032x.c38
1 files changed, 9 insertions, 29 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c
index 46cff48e6297..5cf1af96d5f5 100644
--- a/drivers/media/video/gspca/vc032x.c
+++ b/drivers/media/video/gspca/vc032x.c
@@ -1416,29 +1416,10 @@ static int sd_config(struct gspca_dev *gspca_dev,
1416 struct usb_device *dev = gspca_dev->dev; 1416 struct usb_device *dev = gspca_dev->dev;
1417 struct cam *cam; 1417 struct cam *cam;
1418 int sensor; 1418 int sensor;
1419 __u16 product;
1420
1421 product = id->idProduct;
1422 sd->bridge = BRIDGE_VC0321;
1423 switch (id->idVendor) {
1424 case 0x0ac8: /* Vimicro z-star */
1425 switch (product) {
1426 case 0x0323:
1427 sd->bridge = BRIDGE_VC0323;
1428 break;
1429 }
1430 break;
1431 case 0x17ef: /* Lenovo */
1432/* switch (product) { */
1433/* case 0x4802: * Lenovo MI1310_SOC */
1434 sd->bridge = BRIDGE_VC0323;
1435/* break; */
1436/* } */
1437 break;
1438 }
1439 1419
1440 cam = &gspca_dev->cam; 1420 cam = &gspca_dev->cam;
1441 cam->epaddr = 0x02; 1421 cam->epaddr = 0x02;
1422 sd->bridge = id->driver_info;
1442 if (sd->bridge == BRIDGE_VC0321) { 1423 if (sd->bridge == BRIDGE_VC0321) {
1443 cam->cam_mode = vc0321_mode; 1424 cam->cam_mode = vc0321_mode;
1444 cam->nmodes = ARRAY_SIZE(vc0321_mode); 1425 cam->nmodes = ARRAY_SIZE(vc0321_mode);
@@ -1767,16 +1748,15 @@ static const struct sd_desc sd_desc = {
1767}; 1748};
1768 1749
1769/* -- module initialisation -- */ 1750/* -- module initialisation -- */
1770#define DVNM(name) .driver_info = (kernel_ulong_t) name
1771static const __devinitdata struct usb_device_id device_table[] = { 1751static const __devinitdata struct usb_device_id device_table[] = {
1772 {USB_DEVICE(0x046d, 0x0892), DVNM("Logitech Orbicam")}, 1752 {USB_DEVICE(0x046d, 0x0892), BRIDGE_VC0321},
1773 {USB_DEVICE(0x046d, 0x0896), DVNM("Logitech Orbicam")}, 1753 {USB_DEVICE(0x046d, 0x0896), BRIDGE_VC0321},
1774 {USB_DEVICE(0x0ac8, 0x0321), DVNM("Vimicro generic vc0321")}, 1754 {USB_DEVICE(0x0ac8, 0x0321), BRIDGE_VC0321},
1775 {USB_DEVICE(0x0ac8, 0x0323), DVNM("Vimicro Vc0323")}, 1755 {USB_DEVICE(0x0ac8, 0x0323), BRIDGE_VC0323},
1776 {USB_DEVICE(0x0ac8, 0x0328), DVNM("A4Tech PK-130MG")}, 1756 {USB_DEVICE(0x0ac8, 0x0328), BRIDGE_VC0321},
1777 {USB_DEVICE(0x0ac8, 0xc001), DVNM("Sony embedded vimicro")}, 1757 {USB_DEVICE(0x0ac8, 0xc001), BRIDGE_VC0321},
1778 {USB_DEVICE(0x0ac8, 0xc002), DVNM("Sony embedded vimicro")}, 1758 {USB_DEVICE(0x0ac8, 0xc002), BRIDGE_VC0321},
1779 {USB_DEVICE(0x17ef, 0x4802), DVNM("Lenovo Vc0323+MI1310_SOC")}, 1759 {USB_DEVICE(0x17ef, 0x4802), BRIDGE_VC0323},
1780 {} 1760 {}
1781}; 1761};
1782MODULE_DEVICE_TABLE(usb, device_table); 1762MODULE_DEVICE_TABLE(usb, device_table);