summaryrefslogtreecommitdiff
path: root/drivers/media/radio/radio-ma901.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2013-04-07 18:37:01 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-07 18:37:01 -0400
commitd978a6361ad13f1f9694fcb7b5852d253a544d92 (patch)
tree8e8a8c62286fab2c044c4b53563222c1b66d7cb0 /drivers/media/radio/radio-ma901.c
parent8303e699f7089a1cd1421750fb33f289e5f3e1b9 (diff)
parentcb28ea3b13b86fb23448525f34720e659bda7aa8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/nfc/microread/mei.c net/netfilter/nfnetlink_queue_core.c Pull in 'net' to get Eric Biederman's AF_UNIX fix, upon which some cleanups are going to go on-top. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/media/radio/radio-ma901.c')
-rw-r--r--drivers/media/radio/radio-ma901.c11
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)
static int usb_ma901radio_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
+ struct usb_device *dev = interface_to_usbdev(intf);
struct ma901radio_device *radio;
int retval = 0;
+ /* Masterkit MA901 usb radio has the same USB ID as many others
+ * Atmel V-USB devices. Let's make additional checks to be sure
+ * that this is our device.
+ */
+
+ if (dev->product && dev->manufacturer &&
+ (strncmp(dev->product, "MA901", 5) != 0
+ || strncmp(dev->manufacturer, "www.masterkit.ru", 16) != 0))
+ return -ENODEV;
+
radio = kzalloc(sizeof(struct ma901radio_device), GFP_KERNEL);
if (!radio) {
dev_err(&intf->dev, "kzalloc for ma901radio_device failed\n");