diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/usb/misc/iowarrior.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/usb/misc/iowarrior.c')
-rw-r--r-- | drivers/usb/misc/iowarrior.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c index bc88c79875a1..a2190b983f52 100644 --- a/drivers/usb/misc/iowarrior.c +++ b/drivers/usb/misc/iowarrior.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #ifdef CONFIG_USB_DYNAMIC_MINORS | 40 | #ifdef CONFIG_USB_DYNAMIC_MINORS |
41 | #define IOWARRIOR_MINOR_BASE 0 | 41 | #define IOWARRIOR_MINOR_BASE 0 |
42 | #else | 42 | #else |
43 | #define IOWARRIOR_MINOR_BASE 208 // SKELETON_MINOR_BASE 192 + 16, not offical yet | 43 | #define IOWARRIOR_MINOR_BASE 208 // SKELETON_MINOR_BASE 192 + 16, not official yet |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | /* interrupt input queue size */ | 46 | /* interrupt input queue size */ |
@@ -374,7 +374,7 @@ static ssize_t iowarrior_write(struct file *file, | |||
374 | case USB_DEVICE_ID_CODEMERCS_IOWPV2: | 374 | case USB_DEVICE_ID_CODEMERCS_IOWPV2: |
375 | case USB_DEVICE_ID_CODEMERCS_IOW40: | 375 | case USB_DEVICE_ID_CODEMERCS_IOW40: |
376 | /* IOW24 and IOW40 use a synchronous call */ | 376 | /* IOW24 and IOW40 use a synchronous call */ |
377 | buf = kmalloc(8, GFP_KERNEL); /* 8 bytes are enough for both products */ | 377 | buf = kmalloc(count, GFP_KERNEL); |
378 | if (!buf) { | 378 | if (!buf) { |
379 | retval = -ENOMEM; | 379 | retval = -ENOMEM; |
380 | goto exit; | 380 | goto exit; |
@@ -553,6 +553,7 @@ static long iowarrior_ioctl(struct file *file, unsigned int cmd, | |||
553 | /* needed for power consumption */ | 553 | /* needed for power consumption */ |
554 | struct usb_config_descriptor *cfg_descriptor = &dev->udev->actconfig->desc; | 554 | struct usb_config_descriptor *cfg_descriptor = &dev->udev->actconfig->desc; |
555 | 555 | ||
556 | memset(&info, 0, sizeof(info)); | ||
556 | /* directly from the descriptor */ | 557 | /* directly from the descriptor */ |
557 | info.vendor = le16_to_cpu(dev->udev->descriptor.idVendor); | 558 | info.vendor = le16_to_cpu(dev->udev->descriptor.idVendor); |
558 | info.product = dev->product_id; | 559 | info.product = dev->product_id; |
@@ -730,6 +731,7 @@ static const struct file_operations iowarrior_fops = { | |||
730 | .open = iowarrior_open, | 731 | .open = iowarrior_open, |
731 | .release = iowarrior_release, | 732 | .release = iowarrior_release, |
732 | .poll = iowarrior_poll, | 733 | .poll = iowarrior_poll, |
734 | .llseek = noop_llseek, | ||
733 | }; | 735 | }; |
734 | 736 | ||
735 | static char *iowarrior_devnode(struct device *dev, mode_t *mode) | 737 | static char *iowarrior_devnode(struct device *dev, mode_t *mode) |
@@ -767,7 +769,7 @@ static int iowarrior_probe(struct usb_interface *interface, | |||
767 | int i; | 769 | int i; |
768 | int retval = -ENOMEM; | 770 | int retval = -ENOMEM; |
769 | 771 | ||
770 | /* allocate memory for our device state and intialize it */ | 772 | /* allocate memory for our device state and initialize it */ |
771 | dev = kzalloc(sizeof(struct iowarrior), GFP_KERNEL); | 773 | dev = kzalloc(sizeof(struct iowarrior), GFP_KERNEL); |
772 | if (dev == NULL) { | 774 | if (dev == NULL) { |
773 | dev_err(&interface->dev, "Out of memory\n"); | 775 | dev_err(&interface->dev, "Out of memory\n"); |