summaryrefslogtreecommitdiff
path: root/drivers/usb/media/et61x251_tas5130d1b.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/media/et61x251_tas5130d1b.c')
-rw-r--r--drivers/usb/media/et61x251_tas5130d1b.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/media/et61x251_tas5130d1b.c b/drivers/usb/media/et61x251_tas5130d1b.c
index 65f1ae9cf2b3..3998d76a307a 100644
--- a/drivers/usb/media/et61x251_tas5130d1b.c
+++ b/drivers/usb/media/et61x251_tas5130d1b.c
@@ -126,12 +126,16 @@ static struct et61x251_sensor tas5130d1b = {
int et61x251_probe_tas5130d1b(struct et61x251_device* cam)
{
- /* This sensor has no identifiers, so let's attach it anyway */
- et61x251_attach_sensor(cam, &tas5130d1b);
+ const struct usb_device_id tas5130d1b_id_table[] = {
+ { USB_DEVICE(0x102c, 0x6251), },
+ { }
+ };
/* Sensor detection is based on USB pid/vid */
- if (le16_to_cpu(tas5130d1b.usbdev->descriptor.idProduct) != 0x6251)
+ if (!et61x251_match_id(cam, tas5130d1b_id_table))
return -ENODEV;
+ et61x251_attach_sensor(cam, &tas5130d1b);
+
return 0;
}