diff options
Diffstat (limited to 'drivers/media/radio/radio-ma901.c')
-rw-r--r-- | drivers/media/radio/radio-ma901.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-ma901.c b/drivers/media/radio/radio-ma901.c index c61f590029ad..348dafc0318a 100644 --- a/drivers/media/radio/radio-ma901.c +++ b/drivers/media/radio/radio-ma901.c | |||
@@ -347,9 +347,20 @@ static void usb_ma901radio_release(struct v4l2_device *v4l2_dev) | |||
347 | static int usb_ma901radio_probe(struct usb_interface *intf, | 347 | static int usb_ma901radio_probe(struct usb_interface *intf, |
348 | const struct usb_device_id *id) | 348 | const struct usb_device_id *id) |
349 | { | 349 | { |
350 | struct usb_device *dev = interface_to_usbdev(intf); | ||
350 | struct ma901radio_device *radio; | 351 | struct ma901radio_device *radio; |
351 | int retval = 0; | 352 | int retval = 0; |
352 | 353 | ||
354 | /* Masterkit MA901 usb radio has the same USB ID as many others | ||
355 | * Atmel V-USB devices. Let's make additional checks to be sure | ||
356 | * that this is our device. | ||
357 | */ | ||
358 | |||
359 | if (dev->product && dev->manufacturer && | ||
360 | (strncmp(dev->product, "MA901", 5) != 0 | ||
361 | || strncmp(dev->manufacturer, "www.masterkit.ru", 16) != 0)) | ||
362 | return -ENODEV; | ||
363 | |||
353 | radio = kzalloc(sizeof(struct ma901radio_device), GFP_KERNEL); | 364 | radio = kzalloc(sizeof(struct ma901radio_device), GFP_KERNEL); |
354 | if (!radio) { | 365 | if (!radio) { |
355 | dev_err(&intf->dev, "kzalloc for ma901radio_device failed\n"); | 366 | dev_err(&intf->dev, "kzalloc for ma901radio_device failed\n"); |