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.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index ef3e88f0b3c3..a3ef2a9d9dc2 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -1135,7 +1135,7 @@ MODULE_LICENSE ("GPL");
1135 1135
1136#ifdef CONFIG_XPS_USB_HCD_XILINX 1136#ifdef CONFIG_XPS_USB_HCD_XILINX
1137#include "ehci-xilinx-of.c" 1137#include "ehci-xilinx-of.c"
1138#define OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver 1138#define XILINX_OF_PLATFORM_DRIVER ehci_hcd_xilinx_of_driver
1139#endif 1139#endif
1140 1140
1141#ifdef CONFIG_PLAT_ORION 1141#ifdef CONFIG_PLAT_ORION
@@ -1159,7 +1159,8 @@ MODULE_LICENSE ("GPL");
1159#endif 1159#endif
1160 1160
1161#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \ 1161#if !defined(PCI_DRIVER) && !defined(PLATFORM_DRIVER) && \
1162 !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) 1162 !defined(PS3_SYSTEM_BUS_DRIVER) && !defined(OF_PLATFORM_DRIVER) && \
1163 !defined(XILINX_OF_PLATFORM_DRIVER)
1163#error "missing bus glue for ehci-hcd" 1164#error "missing bus glue for ehci-hcd"
1164#endif 1165#endif
1165 1166
@@ -1213,10 +1214,20 @@ static int __init ehci_hcd_init(void)
1213 if (retval < 0) 1214 if (retval < 0)
1214 goto clean3; 1215 goto clean3;
1215#endif 1216#endif
1217
1218#ifdef XILINX_OF_PLATFORM_DRIVER
1219 retval = of_register_platform_driver(&XILINX_OF_PLATFORM_DRIVER);
1220 if (retval < 0)
1221 goto clean4;
1222#endif
1216 return retval; 1223 return retval;
1217 1224
1225#ifdef XILINX_OF_PLATFORM_DRIVER
1226 /* of_unregister_platform_driver(&XILINX_OF_PLATFORM_DRIVER); */
1227clean4:
1228#endif
1218#ifdef OF_PLATFORM_DRIVER 1229#ifdef OF_PLATFORM_DRIVER
1219 /* of_unregister_platform_driver(&OF_PLATFORM_DRIVER); */ 1230 of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
1220clean3: 1231clean3:
1221#endif 1232#endif
1222#ifdef PS3_SYSTEM_BUS_DRIVER 1233#ifdef PS3_SYSTEM_BUS_DRIVER
@@ -1243,6 +1254,9 @@ module_init(ehci_hcd_init);
1243 1254
1244static void __exit ehci_hcd_cleanup(void) 1255static void __exit ehci_hcd_cleanup(void)
1245{ 1256{
1257#ifdef XILINX_OF_PLATFORM_DRIVER
1258 of_unregister_platform_driver(&XILINX_OF_PLATFORM_DRIVER);
1259#endif
1246#ifdef OF_PLATFORM_DRIVER 1260#ifdef OF_PLATFORM_DRIVER
1247 of_unregister_platform_driver(&OF_PLATFORM_DRIVER); 1261 of_unregister_platform_driver(&OF_PLATFORM_DRIVER);
1248#endif 1262#endif