diff options
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/berry_charge.c | 2 | ||||
-rw-r--r-- | drivers/usb/misc/ftdi-elan.c | 18 |
2 files changed, 17 insertions, 3 deletions
diff --git a/drivers/usb/misc/berry_charge.c b/drivers/usb/misc/berry_charge.c index 60893c6c8221..b15f2fd8dab4 100644 --- a/drivers/usb/misc/berry_charge.c +++ b/drivers/usb/misc/berry_charge.c | |||
@@ -69,7 +69,7 @@ static int magic_charge(struct usb_device *udev) | |||
69 | return retval; | 69 | return retval; |
70 | } | 70 | } |
71 | 71 | ||
72 | dbg(&udev->dev, "Sending first magic command\n"); | 72 | dbg(&udev->dev, "Sending second magic command\n"); |
73 | retval = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), | 73 | retval = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), |
74 | 0xa2, 0x40, 0, 1, dummy_buffer, 0, 100); | 74 | 0xa2, 0x40, 0, 1, dummy_buffer, 0, 100); |
75 | if (retval != 0) { | 75 | if (retval != 0) { |
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 0c1d66ddb812..bc3327e3dd78 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c | |||
@@ -2905,17 +2905,31 @@ static int __init ftdi_elan_init(void) | |||
2905 | { | 2905 | { |
2906 | int result; | 2906 | int result; |
2907 | printk(KERN_INFO "driver %s built at %s on %s\n", ftdi_elan_driver.name, | 2907 | printk(KERN_INFO "driver %s built at %s on %s\n", ftdi_elan_driver.name, |
2908 | __TIME__, __DATE__); | 2908 | __TIME__, __DATE__); |
2909 | init_MUTEX(&ftdi_module_lock); | 2909 | init_MUTEX(&ftdi_module_lock); |
2910 | INIT_LIST_HEAD(&ftdi_static_list); | 2910 | INIT_LIST_HEAD(&ftdi_static_list); |
2911 | status_queue = create_singlethread_workqueue("ftdi-status-control"); | 2911 | status_queue = create_singlethread_workqueue("ftdi-status-control"); |
2912 | if (!status_queue) | ||
2913 | goto err1; | ||
2912 | command_queue = create_singlethread_workqueue("ftdi-command-engine"); | 2914 | command_queue = create_singlethread_workqueue("ftdi-command-engine"); |
2915 | if (!command_queue) | ||
2916 | goto err2; | ||
2913 | respond_queue = create_singlethread_workqueue("ftdi-respond-engine"); | 2917 | respond_queue = create_singlethread_workqueue("ftdi-respond-engine"); |
2918 | if (!respond_queue) | ||
2919 | goto err3; | ||
2914 | result = usb_register(&ftdi_elan_driver); | 2920 | result = usb_register(&ftdi_elan_driver); |
2915 | if (result) | 2921 | if (result) |
2916 | printk(KERN_ERR "usb_register failed. Error number %d\n", | 2922 | printk(KERN_ERR "usb_register failed. Error number %d\n", |
2917 | result); | 2923 | result); |
2918 | return result; | 2924 | return result; |
2925 | |||
2926 | err3: | ||
2927 | destroy_workqueue(command_queue); | ||
2928 | err2: | ||
2929 | destroy_workqueue(status_queue); | ||
2930 | err1: | ||
2931 | printk(KERN_ERR "%s couldn't create workqueue\n", ftdi_elan_driver.name); | ||
2932 | return -ENOMEM; | ||
2919 | } | 2933 | } |
2920 | 2934 | ||
2921 | static void __exit ftdi_elan_exit(void) | 2935 | static void __exit ftdi_elan_exit(void) |