]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/media/sn9c102_tas5110c1b.c
[PATCH] USB: SN9C10x driver updates
[linux-2.6-omap-h63xx.git] / drivers / usb / media / sn9c102_tas5110c1b.c
index 32ddf236cafed990b242404473cc3dc41f82f102..2e08c552f40a85ce69630c8e8754fc77f020d8a9 100644 (file)
@@ -142,14 +142,18 @@ static struct sn9c102_sensor tas5110c1b = {
 
 int sn9c102_probe_tas5110c1b(struct sn9c102_device* cam)
 {
-       /* This sensor has no identifiers, so let's attach it anyway */
-       sn9c102_attach_sensor(cam, &tas5110c1b);
+       const struct usb_device_id tas5110c1b_id_table[] = {
+               { USB_DEVICE(0x0c45, 0x6001), },
+               { USB_DEVICE(0x0c45, 0x6005), },
+               { USB_DEVICE(0x0c45, 0x60ab), },
+               { }
+       };
 
        /* Sensor detection is based on USB pid/vid */
-       if (le16_to_cpu(tas5110c1b.usbdev->descriptor.idProduct) != 0x6001 &&
-           le16_to_cpu(tas5110c1b.usbdev->descriptor.idProduct) != 0x6005 &&
-           le16_to_cpu(tas5110c1b.usbdev->descriptor.idProduct) != 0x60ab)
+       if (!sn9c102_match_id(cam, tas5110c1b_id_table))
                return -ENODEV;
 
+       sn9c102_attach_sensor(cam, &tas5110c1b);
+
        return 0;
 }