Mercurial > code > home > repos > light9
comparison 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 |
comparison
equal
deleted
inserted
replaced
874:167a61d3cfbf | 875:2b2ad8e7cb9f |
---|---|
46 #undef dbg | 46 #undef dbg |
47 #define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg); } while (0) | 47 #define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg); } while (0) |
48 | 48 |
49 #ifndef info | 49 #ifndef info |
50 #define info(format, arg...) do { printk(KERN_INFO __FILE__ ": " format "\n" , ## arg); } while (0) | 50 #define info(format, arg...) do { printk(KERN_INFO __FILE__ ": " format "\n" , ## arg); } while (0) |
51 #endif | |
52 | |
53 #ifndef err | |
54 #define err(format, arg...) do { printk(KERN_INFO __FILE__ ": (error) " format "\n" , ## arg); } while (0) | |
51 #endif | 55 #endif |
52 | 56 |
53 /* Version Information */ | 57 /* Version Information */ |
54 #define DRIVER_VERSION "v0.1.20111215" | 58 #define DRIVER_VERSION "v0.1.20111215" |
55 #define DRIVER_AUTHOR "Erwin Rol, erwin@erwinrol.com" | 59 #define DRIVER_AUTHOR "Erwin Rol, erwin@erwinrol.com" |
629 size_t buffer_size; | 633 size_t buffer_size; |
630 int i; | 634 int i; |
631 int retval = -ENOMEM; | 635 int retval = -ENOMEM; |
632 | 636 |
633 /* See if the device offered us matches what we can accept */ | 637 /* See if the device offered us matches what we can accept */ |
634 if ((udev->descriptor.idVendor != FTDI_VID) || | 638 if ((le16_to_cpu(udev->descriptor.idVendor) != FTDI_VID) || |
635 (udev->descriptor.idProduct != FTDI_8U232AM_PID)) { | 639 (le16_to_cpu(udev->descriptor.idProduct) != FTDI_8U232AM_PID)) { |
636 return -ENODEV; | 640 return -ENODEV; |
637 } | 641 } |
638 | 642 |
639 /* allocate memory for our device state and initialize it */ | 643 /* allocate memory for our device state and initialize it */ |
640 dev = kmalloc (sizeof(struct dmx_usb_device), GFP_KERNEL); | 644 dev = kmalloc (sizeof(struct dmx_usb_device), GFP_KERNEL); |