diff options
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 3f80003b40bd..8baecbdf0621 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -914,8 +914,14 @@ MODULE_LICENSE ("GPL"); | |||
914 | #endif | 914 | #endif |
915 | 915 | ||
916 | 916 | ||
917 | #ifdef CONFIG_USB_OHCI_HCD_PPC_OF | ||
918 | #include "ohci-ppc-of.c" | ||
919 | #define OF_PLATFORM_DRIVER ohci_hcd_ppc_of_driver | ||
920 | #endif | ||
921 | |||
917 | #if !defined(PCI_DRIVER) && \ | 922 | #if !defined(PCI_DRIVER) && \ |
918 | !defined(PLATFORM_DRIVER) && \ | 923 | !defined(PLATFORM_DRIVER) && \ |
924 | !defined(OF_PLATFORM_DRIVER) && \ | ||
919 | !defined(SA1111_DRIVER) | 925 | !defined(SA1111_DRIVER) |
920 | #error "missing bus glue for ohci-hcd" | 926 | #error "missing bus glue for ohci-hcd" |
921 | #endif | 927 | #endif |
@@ -939,6 +945,13 @@ static int __init ohci_hcd_mod_init(void) | |||
939 | ls++; | 945 | ls++; |
940 | #endif | 946 | #endif |
941 | 947 | ||
948 | #ifdef OF_PLATFORM_DRIVER | ||
949 | retval = of_register_platform_driver(&OF_PLATFORM_DRIVER); | ||
950 | if (retval < 0) | ||
951 | goto error; | ||
952 | ls++; | ||
953 | #endif | ||
954 | |||
942 | #ifdef SA1111_DRIVER | 955 | #ifdef SA1111_DRIVER |
943 | retval = sa1111_driver_register(&SA1111_DRIVER); | 956 | retval = sa1111_driver_register(&SA1111_DRIVER); |
944 | if (retval < 0) | 957 | if (retval < 0) |
@@ -961,6 +974,10 @@ error: | |||
961 | if (ls--) | 974 | if (ls--) |
962 | platform_driver_unregister(&PLATFORM_DRIVER); | 975 | platform_driver_unregister(&PLATFORM_DRIVER); |
963 | #endif | 976 | #endif |
977 | #ifdef OF_PLATFORM_DRIVER | ||
978 | if (ls--) | ||
979 | of_unregister_platform_driver(&OF_PLATFORM_DRIVER); | ||
980 | #endif | ||
964 | #ifdef SA1111_DRIVER | 981 | #ifdef SA1111_DRIVER |
965 | if (ls--) | 982 | if (ls--) |
966 | sa1111_driver_unregister(&SA1111_DRIVER); | 983 | sa1111_driver_unregister(&SA1111_DRIVER); |
@@ -977,6 +994,9 @@ static void __exit ohci_hcd_mod_exit(void) | |||
977 | #ifdef SA1111_DRIVER | 994 | #ifdef SA1111_DRIVER |
978 | sa1111_driver_unregister(&SA1111_DRIVER); | 995 | sa1111_driver_unregister(&SA1111_DRIVER); |
979 | #endif | 996 | #endif |
997 | #ifdef OF_PLATFORM_DRIVER | ||
998 | of_unregister_platform_driver(&OF_PLATFORM_DRIVER); | ||
999 | #endif | ||
980 | #ifdef PLATFORM_DRIVER | 1000 | #ifdef PLATFORM_DRIVER |
981 | platform_driver_unregister(&PLATFORM_DRIVER); | 1001 | platform_driver_unregister(&PLATFORM_DRIVER); |
982 | #endif | 1002 | #endif |