V4L/DVB (8671): gspca: Remove the unused field 'dev_name' of the device structure.
[linux-2.6.git] / drivers / media / video / gspca / spca561.c
index f0770ee595d8d866d642c9622b53bf40f18cf9be..a9f7c99e6f56913baaf818d0916749abd5c8aca3 100644 (file)
@@ -24,9 +24,6 @@
 
 #include "gspca.h"
 
-#define DRIVER_VERSION_NUMBER  KERNEL_VERSION(2, 1, 5)
-static const char version[] = "2.1.5";
-
 MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
 MODULE_DESCRIPTION("GSPCA/SPCA561 USB Camera Driver");
 MODULE_LICENSE("GPL");
@@ -37,6 +34,7 @@ struct sd {
 
        unsigned short contrast;
        __u8 brightness;
+       __u8 white;
        __u8 autogain;
 
        __u8 chip_revision;
@@ -49,11 +47,12 @@ static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val);
+static int sd_setwhite(struct gspca_dev *gspca_dev, __s32 val);
+static int sd_getwhite(struct gspca_dev *gspca_dev, __s32 *val);
 static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val);
 static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val);
 
 static struct ctrl sd_ctrls[] = {
-#define SD_BRIGHTNESS 0
        {
         {
          .id = V4L2_CID_BRIGHTNESS,
@@ -62,12 +61,12 @@ static struct ctrl sd_ctrls[] = {
          .minimum = 0,
          .maximum = 63,
          .step = 1,
-         .default_value = 32,
+#define BRIGHTNESS_DEF 32
+               .default_value = BRIGHTNESS_DEF,
          },
         .set = sd_setbrightness,
         .get = sd_getbrightness,
         },
-#define SD_CONTRAST 1
        {
         {
          .id = V4L2_CID_CONTRAST,
@@ -76,12 +75,26 @@ static struct ctrl sd_ctrls[] = {
          .minimum = 0,
          .maximum = 0x3fff,
          .step = 1,
-         .default_value = 0x2000,
+#define CONTRAST_DEF 0x2000
+               .default_value = CONTRAST_DEF,
          },
         .set = sd_setcontrast,
         .get = sd_getcontrast,
         },
-#define SD_AUTOGAIN 2
+       {
+           {
+               .id = V4L2_CID_DO_WHITE_BALANCE,
+               .type = V4L2_CTRL_TYPE_INTEGER,
+               .name = "While Balance",
+               .minimum = 0,
+               .maximum = 0x7f,
+               .step = 1,
+#define WHITE_DEF 40
+               .default_value = WHITE_DEF,
+               },
+               .set = sd_setwhite,
+               .get = sd_getwhite,
+           },
        {
         {
          .id = V4L2_CID_AUTOGAIN,
@@ -90,7 +103,8 @@ static struct ctrl sd_ctrls[] = {
          .minimum = 0,
          .maximum = 1,
          .step = 1,
-         .default_value = 1,
+#define AUTOGAIN_DEF 1
+         .default_value = AUTOGAIN_DEF,
          },
         .set = sd_setautogain,
         .get = sd_getautogain,
@@ -177,27 +191,28 @@ static void write_vector(struct gspca_dev *gspca_dev,
        }
 }
 
-static void reg_r(struct usb_device *dev,
-                 __u16 index, __u8 *buffer, __u16 length)
+/* read 'len' bytes to gspca_dev->usb_buf */
+static void reg_r(struct gspca_dev *gspca_dev,
+                 __u16 index, __u16 length)
 {
-       usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
+       usb_control_msg(gspca_dev->dev,
+                       usb_rcvctrlpipe(gspca_dev->dev, 0),
                        0,                      /* request */
                        USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
                        0,                      /* value */
-                       index, buffer, length, 500);
+                       index, gspca_dev->usb_buf, length, 500);
 }
 
-static void reg_w_buf(struct usb_device *dev,
+static void reg_w_buf(struct gspca_dev *gspca_dev,
                      __u16 index, const __u8 *buffer, __u16 len)
 {
-       __u8 tmpbuf[8];
-
-       memcpy(tmpbuf, buffer, len);
-       usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
+       memcpy(gspca_dev->usb_buf, buffer, len);
+       usb_control_msg(gspca_dev->dev,
+                       usb_sndctrlpipe(gspca_dev->dev, 0),
                        0,                      /* request */
                        USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
                        0,                      /* value */
-                       index, tmpbuf, len, 500);
+                       index, gspca_dev->usb_buf, len, 500);
 }
 
 static void i2c_init(struct gspca_dev *gspca_dev, __u8 mode)
@@ -211,7 +226,6 @@ static void i2c_write(struct gspca_dev *gspca_dev, __u16 valeur, __u16 reg)
        int retry = 60;
        __u8 DataLow;
        __u8 DataHight;
-       __u8 Data;
 
        DataLow = valeur;
        DataHight = valeur >> 8;
@@ -219,8 +233,8 @@ static void i2c_write(struct gspca_dev *gspca_dev, __u16 valeur, __u16 reg)
        reg_w_val(gspca_dev->dev, DataLow, 0x8805);
        reg_w_val(gspca_dev->dev, DataHight, 0x8800);
        while (retry--) {
-               reg_r(gspca_dev->dev, 0x8803, &Data, 1);
-               if (!Data)
+               reg_r(gspca_dev, 0x8803, 1);
+               if (!gspca_dev->usb_buf[0])
                        break;
        }
 }
@@ -230,20 +244,21 @@ static int i2c_read(struct gspca_dev *gspca_dev, __u16 reg, __u8 mode)
        int retry = 60;
        __u8 value;
        __u8 vallsb;
-       __u8 Data;
 
        reg_w_val(gspca_dev->dev, 0x92, 0x8804);
        reg_w_val(gspca_dev->dev, reg, 0x8801);
        reg_w_val(gspca_dev->dev, (mode | 0x01), 0x8802);
        while (retry--) {
-               reg_r(gspca_dev->dev, 0x8803, &Data, 1);
-               if (!Data)
+               reg_r(gspca_dev, 0x8803, 1);
+               if (!gspca_dev->usb_buf)
                        break;
        }
        if (retry == 0)
                return -1;
-       reg_r(gspca_dev->dev, 0x8800, &value, 1);
-       reg_r(gspca_dev->dev, 0x8805, &vallsb, 1);
+       reg_r(gspca_dev, 0x8800, 1);
+       value = gspca_dev->usb_buf[0];
+       reg_r(gspca_dev, 0x8805, 1);
+       vallsb = gspca_dev->usb_buf[0];
        return ((int) value << 8) | vallsb;
 }
 
@@ -440,7 +455,7 @@ static const __u16 spca561_init_data[][2] = {
        {0x0035, 0x8801},       /* 0x14 - set gain general */
        {0x001f, 0x8805},       /* 0x14 */
        {0x0000, 0x8800},
-       {0x0030, 0x8112},
+       {0x000e, 0x8112},       /* white balance - was 30 */
        {}
 };
 
@@ -480,9 +495,10 @@ static const __u16 Pb100_2map8300[][2] = {
 };
 
 static const __u16 spca561_161rev12A_data1[][2] = {
-       {0x21, 0x8118},
-       {0x01, 0x8114},
-       {0x00, 0x8112},
+       {0x29, 0x8118},         /* white balance - was 21 */
+       {0x08, 0x8114},         /* white balance - was 01 */
+       {0x0e, 0x8112},         /* white balance - was 00 */
+       {0x00, 0x8102},         /* white balance - new */
        {0x92, 0x8804},
        {0x04, 0x8802},         /* windows uses 08 */
        {}
@@ -507,14 +523,16 @@ static const __u16 spca561_161rev12A_data2[][2] = {
        {0xb0, 0x8603},
 
        /* sensor gains */
+       {0x07, 0x8601},         /* white balance - new */
+       {0x07, 0x8602},         /* white balance - new */
        {0x00, 0x8610},         /* *red */
        {0x00, 0x8611},         /* 3f   *green */
        {0x00, 0x8612},         /* green *blue */
        {0x00, 0x8613},         /* blue *green */
-       {0x35, 0x8614},         /* green *red */
-       {0x35, 0x8615},         /* 40   *green */
-       {0x35, 0x8616},         /* 7a   *blue */
-       {0x35, 0x8617},         /* 40   *green */
+       {0x43, 0x8614},         /* green *red - white balance - was 0x35 */
+       {0x40, 0x8615},         /* 40   *green - white balance - was 0x35 */
+       {0x71, 0x8616},         /* 7a   *blue - white balance - was 0x35 */
+       {0x40, 0x8617},         /* 40   *green - white balance - was 0x35 */
 
        {0x0c, 0x8620},         /* 0c */
        {0xc8, 0x8631},         /* c8 */
@@ -529,6 +547,7 @@ static const __u16 spca561_161rev12A_data2[][2] = {
        {0xdf, 0x863c},         /* df */
        {0xf0, 0x8505},
        {0x32, 0x850a},
+       {0x99, 0x8700},         /* - white balance - new */
        {}
 };
 
@@ -541,7 +560,7 @@ static void sensor_mapwrite(struct gspca_dev *gspca_dev,
        while (sensormap[i][0]) {
                usbval[0] = sensormap[i][1];
                usbval[1] = sensormap[i][1] >> 8;
-               reg_w_buf(gspca_dev->dev, sensormap[i][0], usbval, 2);
+               reg_w_buf(gspca_dev, sensormap[i][0], usbval, 2);
                i++;
        }
 }
@@ -559,7 +578,6 @@ static int sd_config(struct gspca_dev *gspca_dev,
                     const struct usb_device_id *id)
 {
        struct sd *sd = (struct sd *) gspca_dev;
-       struct usb_device *dev = gspca_dev->dev;
        struct cam *cam;
        __u16 vendor, product;
        __u8 data1, data2;
@@ -568,48 +586,32 @@ static int sd_config(struct gspca_dev *gspca_dev,
         * prove that we can communicate with the device.  This works, which
         * confirms at we are communicating properly and that the device
         * is a 561. */
-       reg_r(dev, 0x8104, &data1, 1);
-       reg_r(dev, 0x8105, &data2, 1);
+       reg_r(gspca_dev, 0x8104, 1);
+       data1 = gspca_dev->usb_buf[0];
+       reg_r(gspca_dev, 0x8105, 1);
+       data2 = gspca_dev->usb_buf[0];
        vendor = (data2 << 8) | data1;
-       reg_r(dev, 0x8106, &data1, 1);
-       reg_r(dev, 0x8107, &data2, 1);
+       reg_r(gspca_dev, 0x8106, 1);
+       data1 = gspca_dev->usb_buf[0];
+       reg_r(gspca_dev, 0x8107, 1);
+       data2 = gspca_dev->usb_buf[0];
        product = (data2 << 8) | data1;
        if (vendor != id->idVendor || product != id->idProduct) {
                PDEBUG(D_PROBE, "Bad vendor / product from device");
                return -EINVAL;
        }
-       switch (product) {
-       case 0x0928:
-       case 0x0929:
-       case 0x092a:
-       case 0x092b:
-       case 0x092c:
-       case 0x092d:
-       case 0x092e:
-       case 0x092f:
-       case 0x403b:
-               sd->chip_revision = Rev012A;
-               break;
-       default:
-/*     case 0x0561:
-       case 0x0815:                    * ?? in spca508.c
-       case 0x401a:
-       case 0x7004:
-       case 0x7e50:
-       case 0xa001:
-       case 0xcdee: */
-               sd->chip_revision = Rev072A;
-               break;
-       }
+
        cam = &gspca_dev->cam;
-       cam->dev_name = (char *) id->driver_info;
        cam->epaddr = 0x01;
        gspca_dev->nbalt = 7 + 1;       /* choose alternate 7 first */
        cam->cam_mode = sif_mode;
        cam->nmodes = sizeof sif_mode / sizeof sif_mode[0];
-       sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value;
-       sd->contrast = sd_ctrls[SD_CONTRAST].qctrl.default_value;
-       sd->autogain = sd_ctrls[SD_AUTOGAIN].qctrl.default_value;
+
+       sd->chip_revision = id->driver_info;
+       sd->brightness = BRIGHTNESS_DEF;
+       sd->contrast = CONTRAST_DEF;
+       sd->autogain = AUTOGAIN_DEF;
+       sd->white = WHITE_DEF;
        return 0;
 }
 
@@ -647,22 +649,65 @@ static void setcontrast(struct gspca_dev *gspca_dev)
                reg_w_val(dev, lowb, 0x8653);
                reg_w_val(dev, lowb, 0x8654);
                break;
-       case Rev012A: {
+       default: {
+/*     case Rev012A: { */
                __u8 Reg8391[] =
                        { 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00 };
 
                /* Write camera sensor settings */
                expotimes = (sd->contrast >> 5) & 0x07ff;
+               /* exposure is in 8309 2b, range 0120 - 5720 */
                Reg8391[0] = expotimes & 0xff;  /* exposure */
                Reg8391[1] = 0x18 | (expotimes >> 8);
                Reg8391[2] = sd->brightness;    /* gain */
-               reg_w_buf(dev, 0x8391, Reg8391, 8);
-               reg_w_buf(dev, 0x8390, Reg8391, 8);
+               /* gain in 8335, 2b range 0000 - 2400 */
+               reg_w_buf(gspca_dev, 0x8391, Reg8391, 8);
+               reg_w_buf(gspca_dev, 0x8390, Reg8391, 8);
                break;
            }
        }
 }
 
+static void setwhite(struct gspca_dev *gspca_dev)
+{
+       struct sd *sd = (struct sd *) gspca_dev;
+       __u16 white;
+       __u8 reg8614, reg8616;
+
+       switch (sd->chip_revision) {
+       case Rev072A:
+               /* no such hardware */
+               break;
+       default:
+/*     case Rev012A: */
+               white = sd->white;
+               if (sd->white == 0) {
+                       PDEBUG(D_CONF, "Discarding null whiteness");
+                       break;
+               }
+               /* try to emulate MS-win as possible */
+               if (white < 0x45)
+                       reg8616 = white;
+               else
+                       reg8616 = 0x93 + (white >> 2);
+               reg8614 = 0x28 + (white >> 4);
+               reg_w_val(gspca_dev->dev, reg8616, 0x8616);
+               reg_w_val(gspca_dev->dev, reg8614, 0x8614);
+       }
+}
+
+static void setautogain(struct gspca_dev *gspca_dev)
+{
+       struct sd *sd = (struct sd *) gspca_dev;
+
+       if (sd->chip_revision == Rev072A) {
+               if (sd->autogain)
+                       sd->ag_cnt = AG_CNT_START;
+               else
+                       sd->ag_cnt = -1;
+       }
+}
+
 static void sd_start(struct gspca_dev *gspca_dev)
 {
        struct sd *sd = (struct sd *) gspca_dev;
@@ -690,6 +735,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
                reg_w_val(dev, 0x8500, mode);   /* mode */
                reg_w_val(dev, 0x8700, Clck);   /* 0x27 clock */
                reg_w_val(dev, 0x8112, 0x10 | 0x20);
+               setautogain(gspca_dev);
                break;
        default:
 /*     case Rev012A: */
@@ -714,11 +760,13 @@ static void sd_start(struct gspca_dev *gspca_dev)
                         * is sufficient to push raw frames at ~20fps */
                        reg_w_val(dev, 0x8500, mode);
                }               /* -- qq@kuku.eu.org */
-               reg_w_buf(dev, 0x8307, Reg8307, 2);
-               reg_w_val(dev, 0x8700, Clck);   /* 0x8f 0x85 0x27 clock */
-               reg_w_val(dev, 0x8112, 0x1e | 0x20);
-               reg_w_val(dev, 0x850b, 0x03);
+               reg_w_buf(gspca_dev, 0x8307, Reg8307, 2);
+               reg_w_val(gspca_dev->dev, 0x8700, Clck);
+                                               /* 0x8f 0x85 0x27 clock */
+               reg_w_val(gspca_dev->dev, 0x8112, 0x1e | 0x20);
+               reg_w_val(gspca_dev->dev, 0x850b, 0x03);
                setcontrast(gspca_dev);
+               setwhite(gspca_dev);
                break;
        }
 }
@@ -726,6 +774,7 @@ static void sd_start(struct gspca_dev *gspca_dev)
 static void sd_stopN(struct gspca_dev *gspca_dev)
 {
        reg_w_val(gspca_dev->dev, 0x8112, 0x20);
+       reg_w_val(gspca_dev->dev, 0x8102, 0x00); /* white balance - new */
 }
 
 static void sd_stop0(struct gspca_dev *gspca_dev)
@@ -738,24 +787,34 @@ static void sd_close(struct gspca_dev *gspca_dev)
        reg_w_val(gspca_dev->dev, 0x8114, 0);
 }
 
-static void setautogain(struct gspca_dev *gspca_dev)
+static void do_autogain(struct gspca_dev *gspca_dev)
 {
        struct sd *sd = (struct sd *) gspca_dev;
-       int expotimes = 0;
-       int pixelclk = 0;
-       int gainG = 0;
+       int expotimes;
+       int pixelclk;
+       int gainG;
        __u8 R, Gr, Gb, B;
        int y;
        __u8 luma_mean = 110;
        __u8 luma_delta = 20;
        __u8 spring = 4;
 
+       if (sd->ag_cnt < 0)
+               return;
+       if (--sd->ag_cnt >= 0)
+               return;
+       sd->ag_cnt = AG_CNT_START;
+
        switch (sd->chip_revision) {
        case Rev072A:
-               reg_r(gspca_dev->dev, 0x8621, &Gr, 1);
-               reg_r(gspca_dev->dev, 0x8622, &R, 1);
-               reg_r(gspca_dev->dev, 0x8623, &B, 1);
-               reg_r(gspca_dev->dev, 0x8624, &Gb, 1);
+               reg_r(gspca_dev, 0x8621, 1);
+               Gr = gspca_dev->usb_buf[0];
+               reg_r(gspca_dev, 0x8622, 1);
+               R = gspca_dev->usb_buf[0];
+               reg_r(gspca_dev, 0x8623, 1);
+               B = gspca_dev->usb_buf[0];
+               reg_r(gspca_dev, 0x8624, 1);
+               Gb = gspca_dev->usb_buf[0];
                y = (77 * R + 75 * (Gr + Gb) + 29 * B) >> 8;
                /* u= (128*B-(43*(Gr+Gb+R))) >> 8; */
                /* v= (128*R-(53*(Gr+Gb))-21*B) >> 8; */
@@ -809,18 +868,10 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
                        __u8 *data,             /* isoc packet */
                        int len)                /* iso packet length */
 {
-       struct sd *sd = (struct sd *) gspca_dev;
-
        switch (data[0]) {
        case 0:         /* start of frame */
                frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame,
                                        data, 0);
-               if (sd->ag_cnt >= 0) {
-                       if (--sd->ag_cnt < 0) {
-                               sd->ag_cnt = AG_CNT_START;
-                               setautogain(gspca_dev);
-                       }
-               }
                data += SPCA561_OFFSET_DATA;
                len -= SPCA561_OFFSET_DATA;
                if (data[1] & 0x10) {
@@ -867,20 +918,19 @@ static void setbrightness(struct gspca_dev *gspca_dev)
 static void getbrightness(struct gspca_dev *gspca_dev)
 {
        struct sd *sd = (struct sd *) gspca_dev;
-       __u8 value;
        __u16 tot;
 
        switch (sd->chip_revision) {
        case Rev072A:
                tot = 0;
-               reg_r(gspca_dev->dev, 0x8611, &value, 1);
-               tot += value;
-               reg_r(gspca_dev->dev, 0x8612, &value, 1);
-               tot += value;
-               reg_r(gspca_dev->dev, 0x8613, &value, 1);
-               tot += value;
-               reg_r(gspca_dev->dev, 0x8614, &value, 1);
-               tot += value;
+               reg_r(gspca_dev, 0x8611, 1);
+               tot += gspca_dev->usb_buf[0];
+               reg_r(gspca_dev, 0x8612, 1);
+               tot += gspca_dev->usb_buf[0];
+               reg_r(gspca_dev, 0x8613, 1);
+               tot += gspca_dev->usb_buf[0];
+               reg_r(gspca_dev, 0x8614, 1);
+               tot += gspca_dev->usb_buf[0];
                sd->brightness = tot >> 2;
                break;
        default:
@@ -893,20 +943,19 @@ static void getbrightness(struct gspca_dev *gspca_dev)
 static void getcontrast(struct gspca_dev *gspca_dev)
 {
        struct sd *sd = (struct sd *) gspca_dev;
-       __u8 value;
        __u16 tot;
 
        switch (sd->chip_revision) {
        case Rev072A:
                tot = 0;
-               reg_r(gspca_dev->dev, 0x8651, &value, 1);
-               tot += value;
-               reg_r(gspca_dev->dev, 0x8652, &value, 1);
-               tot += value;
-               reg_r(gspca_dev->dev, 0x8653, &value, 1);
-               tot += value;
-               reg_r(gspca_dev->dev, 0x8654, &value, 1);
-               tot += value;
+               reg_r(gspca_dev, 0x8651, 1);
+               tot += gspca_dev->usb_buf[0];
+               reg_r(gspca_dev, 0x8652, 1);
+               tot += gspca_dev->usb_buf[0];
+               reg_r(gspca_dev, 0x8653, 1);
+               tot += gspca_dev->usb_buf[0];
+               reg_r(gspca_dev, 0x8654, 1);
+               tot += gspca_dev->usb_buf[0];
                sd->contrast = tot << 6;
                break;
        default:
@@ -960,10 +1009,8 @@ static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val)
        struct sd *sd = (struct sd *) gspca_dev;
 
        sd->autogain = val;
-       if (val)
-               sd->ag_cnt = AG_CNT_START;
-       else
-               sd->ag_cnt = -1;
+       if (gspca_dev->streaming)
+               setautogain(gspca_dev);
        return 0;
 }
 
@@ -975,6 +1022,25 @@ static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val)
        return 0;
 }
 
+/* white balance - new */
+static int sd_setwhite(struct gspca_dev *gspca_dev, __s32 val)
+{
+       struct sd *sd = (struct sd *) gspca_dev;
+
+       sd->white = val;
+       if (gspca_dev->streaming)
+               setwhite(gspca_dev);
+       return 0;
+}
+
+static int sd_getwhite(struct gspca_dev *gspca_dev, __s32 *val)
+{
+       struct sd *sd = (struct sd *) gspca_dev;
+
+       *val = sd->white;
+       return 0;
+}
+
 /* sub-driver description */
 static const struct sd_desc sd_desc = {
        .name = MODULE_NAME,
@@ -987,26 +1053,26 @@ static const struct sd_desc sd_desc = {
        .stop0 = sd_stop0,
        .close = sd_close,
        .pkt_scan = sd_pkt_scan,
+       .dq_callback = do_autogain,
 };
 
 /* -- module initialisation -- */
-#define DVNM(name) .driver_info = (kernel_ulong_t) name
 static const __devinitdata struct usb_device_id device_table[] = {
-       {USB_DEVICE(0x041e, 0x401a), DVNM("Creative Webcam Vista (PD1100)")},
-       {USB_DEVICE(0x041e, 0x403b),  DVNM("Creative Webcam Vista (VF0010)")},
-       {USB_DEVICE(0x0458, 0x7004), DVNM("Genius VideoCAM Express V2")},
-       {USB_DEVICE(0x046d, 0x0928), DVNM("Logitech QC Express Etch2")},
-       {USB_DEVICE(0x046d, 0x0929), DVNM("Labtec Webcam Elch2")},
-       {USB_DEVICE(0x046d, 0x092a), DVNM("Logitech QC for Notebook")},
-       {USB_DEVICE(0x046d, 0x092b), DVNM("Labtec Webcam Plus")},
-       {USB_DEVICE(0x046d, 0x092c), DVNM("Logitech QC chat Elch2")},
-       {USB_DEVICE(0x046d, 0x092d), DVNM("Logitech QC Elch2")},
-       {USB_DEVICE(0x046d, 0x092e), DVNM("Logitech QC Elch2")},
-       {USB_DEVICE(0x046d, 0x092f), DVNM("Logitech QC Elch2")},
-       {USB_DEVICE(0x04fc, 0x0561), DVNM("Flexcam 100")},
-       {USB_DEVICE(0x060b, 0xa001), DVNM("Maxell Compact Pc PM3")},
-       {USB_DEVICE(0x10fd, 0x7e50), DVNM("FlyCam Usb 100")},
-       {USB_DEVICE(0xabcd, 0xcdee), DVNM("Petcam")},
+       {USB_DEVICE(0x041e, 0x401a), .driver_info = Rev072A},
+       {USB_DEVICE(0x041e, 0x403b), .driver_info = Rev012A},
+       {USB_DEVICE(0x0458, 0x7004), .driver_info = Rev072A},
+       {USB_DEVICE(0x046d, 0x0928), .driver_info = Rev012A},
+       {USB_DEVICE(0x046d, 0x0929), .driver_info = Rev012A},
+       {USB_DEVICE(0x046d, 0x092a), .driver_info = Rev012A},
+       {USB_DEVICE(0x046d, 0x092b), .driver_info = Rev012A},
+       {USB_DEVICE(0x046d, 0x092c), .driver_info = Rev012A},
+       {USB_DEVICE(0x046d, 0x092d), .driver_info = Rev012A},
+       {USB_DEVICE(0x046d, 0x092e), .driver_info = Rev012A},
+       {USB_DEVICE(0x046d, 0x092f), .driver_info = Rev012A},
+       {USB_DEVICE(0x04fc, 0x0561), .driver_info = Rev072A},
+       {USB_DEVICE(0x060b, 0xa001), .driver_info = Rev072A},
+       {USB_DEVICE(0x10fd, 0x7e50), .driver_info = Rev072A},
+       {USB_DEVICE(0xabcd, 0xcdee), .driver_info = Rev072A},
        {}
 };
 
@@ -1032,7 +1098,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)