aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r--drivers/usb/host/ohci-hcd.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 33f1c1c32edf..a8160d65f32b 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -1054,7 +1054,7 @@ MODULE_LICENSE ("GPL");
1054 1054
1055#ifdef CONFIG_MFD_SM501 1055#ifdef CONFIG_MFD_SM501
1056#include "ohci-sm501.c" 1056#include "ohci-sm501.c"
1057#define PLATFORM_DRIVER ohci_hcd_sm501_driver 1057#define SM501_OHCI_DRIVER ohci_hcd_sm501_driver
1058#endif 1058#endif
1059 1059
1060#if !defined(PCI_DRIVER) && \ 1060#if !defined(PCI_DRIVER) && \
@@ -1062,6 +1062,7 @@ MODULE_LICENSE ("GPL");
1062 !defined(OF_PLATFORM_DRIVER) && \ 1062 !defined(OF_PLATFORM_DRIVER) && \
1063 !defined(SA1111_DRIVER) && \ 1063 !defined(SA1111_DRIVER) && \
1064 !defined(PS3_SYSTEM_BUS_DRIVER) && \ 1064 !defined(PS3_SYSTEM_BUS_DRIVER) && \
1065 !defined(SM501_OHCI_DRIVER) && \
1065 !defined(SSB_OHCI_DRIVER) 1066 !defined(SSB_OHCI_DRIVER)
1066#error "missing bus glue for ohci-hcd" 1067#error "missing bus glue for ohci-hcd"
1067#endif 1068#endif
@@ -1121,9 +1122,18 @@ static int __init ohci_hcd_mod_init(void)
1121 goto error_ssb; 1122 goto error_ssb;
1122#endif 1123#endif
1123 1124
1125#ifdef SM501_OHCI_DRIVER
1126 retval = platform_driver_register(&SM501_OHCI_DRIVER);
1127 if (retval < 0)
1128 goto error_sm501;
1129#endif
1130
1124 return retval; 1131 return retval;
1125 1132
1126 /* Error path */ 1133 /* Error path */
1134#ifdef SM501_OHCI_DRIVER
1135 error_sm501:
1136#endif
1127#ifdef SSB_OHCI_DRIVER 1137#ifdef SSB_OHCI_DRIVER
1128 error_ssb: 1138 error_ssb:
1129#endif 1139#endif
@@ -1159,6 +1169,9 @@ module_init(ohci_hcd_mod_init);
1159 1169
1160static void __exit ohci_hcd_mod_exit(void) 1170static void __exit ohci_hcd_mod_exit(void)
1161{ 1171{
1172#ifdef SM501_OHCI_DRIVER
1173 platform_driver_unregister(&SM501_OHCI_DRIVER);
1174#endif
1162#ifdef SSB_OHCI_DRIVER 1175#ifdef SSB_OHCI_DRIVER
1163 ssb_driver_unregister(&SSB_OHCI_DRIVER); 1176 ssb_driver_unregister(&SSB_OHCI_DRIVER);
1164#endif 1177#endif