]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/misc/ftdi-elan.c
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[linux-2.6-omap-h63xx.git] / drivers / usb / misc / ftdi-elan.c
index bc3327e3dd78a9e62897814203a3e4385a104ea0..e0f122e131d720e0580382f88845c2bf47cde5a7 100644 (file)
@@ -73,6 +73,13 @@ static struct list_head ftdi_static_list;
 #include "usb_u132.h"
 #include <asm/io.h>
 #include "../core/hcd.h"
+
+       /* FIXME ohci.h is ONLY for internal use by the OHCI driver.
+        * If you're going to try stuff like this, you need to split
+        * out shareable stuff (register declarations?) into its own
+        * file, maybe name <linux/usb/ohci.h>
+        */
+
 #include "../host/ohci.h"
 /* Define these values to match your devices*/
 #define USB_FTDI_ELAN_VENDOR_ID 0x0403
@@ -2300,11 +2307,7 @@ static int ftdi_elan_checkingPCI(struct usb_ftdi *ftdi)
         offsetof(struct ohci_regs, member), 0, data);
 #define ftdi_write_pcimem(ftdi, member, data) ftdi_elan_write_pcimem(ftdi, \
         offsetof(struct ohci_regs, member), 0, data);
-#define OHCI_QUIRK_AMD756 0x01
-#define OHCI_QUIRK_SUPERIO 0x02
-#define OHCI_QUIRK_INITRESET 0x04
-#define OHCI_BIG_ENDIAN 0x08
-#define OHCI_QUIRK_ZFMICRO 0x10
+
 #define OHCI_CONTROL_INIT OHCI_CTRL_CBSR
 #define OHCI_INTR_INIT (OHCI_INTR_MIE | OHCI_INTR_UE | OHCI_INTR_RD | \
         OHCI_INTR_WDH)
@@ -2910,24 +2913,28 @@ static int __init ftdi_elan_init(void)
         INIT_LIST_HEAD(&ftdi_static_list);
         status_queue = create_singlethread_workqueue("ftdi-status-control");
        if (!status_queue)
-               goto err1;
+               goto err_status_queue;
         command_queue = create_singlethread_workqueue("ftdi-command-engine");
        if (!command_queue)
-               goto err2;
+               goto err_command_queue;
         respond_queue = create_singlethread_workqueue("ftdi-respond-engine");
        if (!respond_queue)
-               goto err3;
+               goto err_respond_queue;
         result = usb_register(&ftdi_elan_driver);
-        if (result)
+        if (result) {
+               destroy_workqueue(status_queue);
+               destroy_workqueue(command_queue);
+               destroy_workqueue(respond_queue);
                 printk(KERN_ERR "usb_register failed. Error number %d\n",
                       result);
+       }
         return result;
 
- err3:
+ err_respond_queue:
        destroy_workqueue(command_queue);
- err2:
+ err_command_queue:
        destroy_workqueue(status_queue);
- err1:
+ err_status_queue:
        printk(KERN_ERR "%s couldn't create workqueue\n", ftdi_elan_driver.name);
        return -ENOMEM;
 }