aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-hcd.c
diff options
context:
space:
mode:
authorIshizaki Kou <kou.ishizaki@toshiba.co.jp>2007-02-14 02:04:17 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2007-02-16 18:32:22 -0500
commit48fda45120a819ca40cadc50144b55bff1c4c78d (patch)
tree6602f22f79b57d3aedccad061be8bcd24b74d8db /drivers/usb/host/ehci-hcd.c
parent7426fa8081766158525e063d69ad129744c42cd7 (diff)
USB: ps3: don't call ps3_system_bus_driver_register on other platforms
ps3_system_bus_driver_register is PS3 platform specific function. On other platforms, it triggers WARN_ON in kref_get. Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r--drivers/usb/host/ehci-hcd.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 6bf909e1adf0..a74056488234 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -42,6 +42,9 @@
42#include <asm/irq.h> 42#include <asm/irq.h>
43#include <asm/system.h> 43#include <asm/system.h>
44#include <asm/unaligned.h> 44#include <asm/unaligned.h>
45#ifdef CONFIG_PPC_PS3
46#include <asm/firmware.h>
47#endif
45 48
46 49
47/*-------------------------------------------------------------------------*/ 50/*-------------------------------------------------------------------------*/
@@ -968,15 +971,18 @@ static int __init ehci_hcd_init(void)
968#endif 971#endif
969 972
970#ifdef PS3_SYSTEM_BUS_DRIVER 973#ifdef PS3_SYSTEM_BUS_DRIVER
971 retval = ps3_system_bus_driver_register(&PS3_SYSTEM_BUS_DRIVER); 974 if (firmware_has_feature(FW_FEATURE_PS3_LV1)) {
972 if (retval < 0) { 975 retval = ps3_system_bus_driver_register(
976 &PS3_SYSTEM_BUS_DRIVER);
977 if (retval < 0) {
973#ifdef PLATFORM_DRIVER 978#ifdef PLATFORM_DRIVER
974 platform_driver_unregister(&PLATFORM_DRIVER); 979 platform_driver_unregister(&PLATFORM_DRIVER);
975#endif 980#endif
976#ifdef PCI_DRIVER 981#ifdef PCI_DRIVER
977 pci_unregister_driver(&PCI_DRIVER); 982 pci_unregister_driver(&PCI_DRIVER);
978#endif 983#endif
979 return retval; 984 return retval;
985 }
980 } 986 }
981#endif 987#endif
982 988
@@ -993,7 +999,8 @@ static void __exit ehci_hcd_cleanup(void)
993 pci_unregister_driver(&PCI_DRIVER); 999 pci_unregister_driver(&PCI_DRIVER);
994#endif 1000#endif
995#ifdef PS3_SYSTEM_BUS_DRIVER 1001#ifdef PS3_SYSTEM_BUS_DRIVER
996 ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); 1002 if (firmware_has_feature(FW_FEATURE_PS3_LV1))
1003 ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER);
997#endif 1004#endif
998} 1005}
999module_exit(ehci_hcd_cleanup); 1006module_exit(ehci_hcd_cleanup);