]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/host/ohci-hcd.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / drivers / usb / host / ohci-hcd.c
index 33f1c1c32edf75ecc5a93e4a171c0afa2806a123..26bc47941d0132f46badea48da3855daf7dedfff 100644 (file)
@@ -974,7 +974,7 @@ MODULE_LICENSE ("GPL");
 #define PCI_DRIVER             ohci_pci_driver
 #endif
 
-#ifdef CONFIG_SA1111
+#if defined(CONFIG_ARCH_SA1100) && defined(CONFIG_SA1111)
 #include "ohci-sa1111.c"
 #define SA1111_DRIVER          ohci_hcd_sa1111_driver
 #endif
@@ -1054,7 +1054,7 @@ MODULE_LICENSE ("GPL");
 
 #ifdef CONFIG_MFD_SM501
 #include "ohci-sm501.c"
-#define PLATFORM_DRIVER                ohci_hcd_sm501_driver
+#define SM501_OHCI_DRIVER      ohci_hcd_sm501_driver
 #endif
 
 #if    !defined(PCI_DRIVER) &&         \
@@ -1062,6 +1062,7 @@ MODULE_LICENSE ("GPL");
        !defined(OF_PLATFORM_DRIVER) && \
        !defined(SA1111_DRIVER) &&      \
        !defined(PS3_SYSTEM_BUS_DRIVER) && \
+       !defined(SM501_OHCI_DRIVER) && \
        !defined(SSB_OHCI_DRIVER)
 #error "missing bus glue for ohci-hcd"
 #endif
@@ -1121,9 +1122,18 @@ static int __init ohci_hcd_mod_init(void)
                goto error_ssb;
 #endif
 
+#ifdef SM501_OHCI_DRIVER
+       retval = platform_driver_register(&SM501_OHCI_DRIVER);
+       if (retval < 0)
+               goto error_sm501;
+#endif
+
        return retval;
 
        /* Error path */
+#ifdef SM501_OHCI_DRIVER
+ error_sm501:
+#endif
 #ifdef SSB_OHCI_DRIVER
  error_ssb:
 #endif
@@ -1159,6 +1169,9 @@ module_init(ohci_hcd_mod_init);
 
 static void __exit ohci_hcd_mod_exit(void)
 {
+#ifdef SM501_OHCI_DRIVER
+       platform_driver_unregister(&SM501_OHCI_DRIVER);
+#endif
 #ifdef SSB_OHCI_DRIVER
        ssb_driver_unregister(&SSB_OHCI_DRIVER);
 #endif