aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 03d567e4d00a..9ec896218feb 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -907,7 +907,13 @@ MODULE_LICENSE ("GPL");
907#define PLATFORM_DRIVER ehci_hcd_au1xxx_driver 907#define PLATFORM_DRIVER ehci_hcd_au1xxx_driver
908#endif 908#endif
909 909
910#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) 910#ifdef CONFIG_PPC_PS3
911#include "ehci-ps3.c"
912#define PS3_SYSTEM_BUS_DRIVER ps3_ehci_sb_driver
913#endif
914
915#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
916 !defined(PS3_SYSTEM_BUS_DRIVER)
911#error "missing bus glue for ehci-hcd" 917#error "missing bus glue for ehci-hcd"
912#endif 918#endif
913 919
@@ -932,6 +938,20 @@ static int __init ehci_hcd_init(void)
932#ifdef PLATFORM_DRIVER 938#ifdef PLATFORM_DRIVER
933 platform_driver_unregister(&PLATFORM_DRIVER); 939 platform_driver_unregister(&PLATFORM_DRIVER);
934#endif 940#endif
941 return retval;
942 }
943#endif
944
945#ifdef PS3_SYSTEM_BUS_DRIVER
946 retval = ps3_system_bus_driver_register(&PS3_SYSTEM_BUS_DRIVER);
947 if (retval < 0) {
948#ifdef PLATFORM_DRIVER
949 platform_driver_unregister(&PLATFORM_DRIVER);
950#endif
951#ifdef PCI_DRIVER
952 pci_unregister_driver(&PCI_DRIVER);
953#endif
954 return retval;
935 } 955 }
936#endif 956#endif
937 957
@@ -947,6 +967,9 @@ static void __exit ehci_hcd_cleanup(void)
947#ifdef PCI_DRIVER 967#ifdef PCI_DRIVER
948 pci_unregister_driver(&PCI_DRIVER); 968 pci_unregister_driver(&PCI_DRIVER);
949#endif 969#endif
970#ifdef PS3_SYSTEM_BUS_DRIVER
971 ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
972#endif
950} 973}
951module_exit(ehci_hcd_cleanup); 974module_exit(ehci_hcd_cleanup);
952 975