diff dmx_usb_module/dmx_usb.c @ 875:2b2ad8e7cb9f

update dmx_usb. ok on kernel 3.5.0 Ignore-this: 207b5a346c5e1e781d46ddcb44d510bf
author Drew Perttula <drewp@bigasterisk.com>
date Fri, 07 Jun 2013 06:40:07 +0000
parents 01d330152a18
children f9aab7275d4e
line wrap: on
line diff
--- a/dmx_usb_module/dmx_usb.c	Thu Jun 06 08:23:17 2013 +0000
+++ b/dmx_usb_module/dmx_usb.c	Fri Jun 07 06:40:07 2013 +0000
@@ -50,6 +50,10 @@
 #define info(format, arg...) do { printk(KERN_INFO __FILE__ ": " format "\n" , ## arg); } while (0)
 #endif
 
+#ifndef err
+#define err(format, arg...) do { printk(KERN_INFO __FILE__ ": (error) " format "\n" , ## arg); } while (0)
+#endif
+
 /* Version Information */
 #define DRIVER_VERSION "v0.1.20111215"
 #define DRIVER_AUTHOR "Erwin Rol, erwin@erwinrol.com"
@@ -631,8 +635,8 @@
 	int retval = -ENOMEM;
 
 	/* See if the device offered us matches what we can accept */
-	if ((udev->descriptor.idVendor != FTDI_VID) ||
-	    (udev->descriptor.idProduct != FTDI_8U232AM_PID)) {
+	if ((le16_to_cpu(udev->descriptor.idVendor) != FTDI_VID) ||
+	    (le16_to_cpu(udev->descriptor.idProduct) != FTDI_8U232AM_PID)) {
 		return -ENODEV;
 	}