]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/gspca/vc032x.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6-omap-h63xx.git] / drivers / media / video / gspca / vc032x.c
index fcf2c9e32573a5d8a2a23a94c5a49fed086c8fa4..f4a52956e0d91eaf8e5b8b37eaee0651f3f040d6 100644 (file)
@@ -24,9 +24,6 @@
 
 #include "gspca.h"
 
-#define DRIVER_VERSION_NUMBER  KERNEL_VERSION(2, 1, 7)
-static const char version[] = "2.1.7";
-
 MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
 MODULE_DESCRIPTION("GSPCA/VC032X USB Camera Driver");
 MODULE_LICENSE("GPL");
@@ -91,12 +88,12 @@ static struct ctrl sd_ctrls[] = {
 
 static struct v4l2_pix_format vc0321_mode[] = {
        {320, 240, V4L2_PIX_FMT_YUV420, V4L2_FIELD_NONE,
-               .bytesperline = 320 * 2,
+               .bytesperline = 320,
                .sizeimage = 320 * 240 * 2,
                .colorspace = V4L2_COLORSPACE_SRGB,
                .priv = 1},
        {640, 480, V4L2_PIX_FMT_YUV420, V4L2_FIELD_NONE,
-               .bytesperline = 640 * 2,
+               .bytesperline = 640,
                .sizeimage = 640 * 480 * 2,
                .colorspace = V4L2_COLORSPACE_SRGB,
                .priv = 0},
@@ -1419,30 +1416,10 @@ static int sd_config(struct gspca_dev *gspca_dev,
        struct usb_device *dev = gspca_dev->dev;
        struct cam *cam;
        int sensor;
-       __u16 product;
-
-       product = id->idProduct;
-       sd->bridge = BRIDGE_VC0321;
-       switch (id->idVendor) {
-       case 0x0ac8:            /* Vimicro z-star */
-               switch (product) {
-               case 0x0323:
-                       sd->bridge = BRIDGE_VC0323;
-                       break;
-               }
-               break;
-       case 0x17ef:            /* Lenovo */
-/*             switch (product) { */
-/*             case 0x4802:     * Lenovo MI1310_SOC */
-                       sd->bridge = BRIDGE_VC0323;
-/*                     break; */
-/*             } */
-               break;
-       }
 
        cam = &gspca_dev->cam;
-       cam->dev_name = (char *) id->driver_info;
        cam->epaddr = 0x02;
+       sd->bridge = id->driver_info;
        if (sd->bridge == BRIDGE_VC0321) {
                cam->cam_mode = vc0321_mode;
                cam->nmodes = ARRAY_SIZE(vc0321_mode);
@@ -1771,16 +1748,15 @@ 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(0x046d, 0x0892), DVNM("Logitech Orbicam")},
-       {USB_DEVICE(0x046d, 0x0896), DVNM("Logitech Orbicam")},
-       {USB_DEVICE(0x0ac8, 0x0321), DVNM("Vimicro generic vc0321")},
-       {USB_DEVICE(0x0ac8, 0x0323), DVNM("Vimicro Vc0323")},
-       {USB_DEVICE(0x0ac8, 0x0328), DVNM("A4Tech PK-130MG")},
-       {USB_DEVICE(0x0ac8, 0xc001), DVNM("Sony embedded vimicro")},
-       {USB_DEVICE(0x0ac8, 0xc002), DVNM("Sony embedded vimicro")},
-       {USB_DEVICE(0x17ef, 0x4802), DVNM("Lenovo Vc0323+MI1310_SOC")},
+       {USB_DEVICE(0x046d, 0x0892), .driver_info = BRIDGE_VC0321},
+       {USB_DEVICE(0x046d, 0x0896), .driver_info = BRIDGE_VC0321},
+       {USB_DEVICE(0x0ac8, 0x0321), .driver_info = BRIDGE_VC0321},
+       {USB_DEVICE(0x0ac8, 0x0323), .driver_info = BRIDGE_VC0323},
+       {USB_DEVICE(0x0ac8, 0x0328), .driver_info = BRIDGE_VC0321},
+       {USB_DEVICE(0x0ac8, 0xc001), .driver_info = BRIDGE_VC0321},
+       {USB_DEVICE(0x0ac8, 0xc002), .driver_info = BRIDGE_VC0321},
+       {USB_DEVICE(0x17ef, 0x4802), .driver_info = BRIDGE_VC0323},
        {}
 };
 MODULE_DEVICE_TABLE(usb, device_table);
@@ -1805,7 +1781,7 @@ static int __init sd_mod_init(void)
 {
        if (usb_register(&sd_driver) < 0)
                return -1;
-       PDEBUG(D_PROBE, "v%s registered", version);
+       PDEBUG(D_PROBE, "registered");
        return 0;
 }
 static void __exit sd_mod_exit(void)