diff options
author | Ishizaki Kou <kou.ishizaki@toshiba.co.jp> | 2007-02-14 02:04:17 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-16 18:32:22 -0500 |
commit | 48fda45120a819ca40cadc50144b55bff1c4c78d (patch) | |
tree | 6602f22f79b57d3aedccad061be8bcd24b74d8db /drivers/usb/host/ohci-hcd.c | |
parent | 7426fa8081766158525e063d69ad129744c42cd7 (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/ohci-hcd.c')
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index fa6a7ceaa0db..f0d29eda3c6d 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -42,6 +42,9 @@ | |||
42 | #include <asm/system.h> | 42 | #include <asm/system.h> |
43 | #include <asm/unaligned.h> | 43 | #include <asm/unaligned.h> |
44 | #include <asm/byteorder.h> | 44 | #include <asm/byteorder.h> |
45 | #ifdef CONFIG_PPC_PS3 | ||
46 | #include <asm/firmware.h> | ||
47 | #endif | ||
45 | 48 | ||
46 | #include "../core/hcd.h" | 49 | #include "../core/hcd.h" |
47 | 50 | ||
@@ -944,9 +947,12 @@ static int __init ohci_hcd_mod_init(void) | |||
944 | sizeof (struct ed), sizeof (struct td)); | 947 | sizeof (struct ed), sizeof (struct td)); |
945 | 948 | ||
946 | #ifdef PS3_SYSTEM_BUS_DRIVER | 949 | #ifdef PS3_SYSTEM_BUS_DRIVER |
947 | retval = ps3_system_bus_driver_register(&PS3_SYSTEM_BUS_DRIVER); | 950 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) { |
948 | if (retval < 0) | 951 | retval = ps3_system_bus_driver_register( |
949 | goto error_ps3; | 952 | &PS3_SYSTEM_BUS_DRIVER); |
953 | if (retval < 0) | ||
954 | goto error_ps3; | ||
955 | } | ||
950 | #endif | 956 | #endif |
951 | 957 | ||
952 | #ifdef PLATFORM_DRIVER | 958 | #ifdef PLATFORM_DRIVER |
@@ -992,7 +998,8 @@ static int __init ohci_hcd_mod_init(void) | |||
992 | error_platform: | 998 | error_platform: |
993 | #endif | 999 | #endif |
994 | #ifdef PS3_SYSTEM_BUS_DRIVER | 1000 | #ifdef PS3_SYSTEM_BUS_DRIVER |
995 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | 1001 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) |
1002 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | ||
996 | error_ps3: | 1003 | error_ps3: |
997 | #endif | 1004 | #endif |
998 | return retval; | 1005 | return retval; |
@@ -1014,7 +1021,8 @@ static void __exit ohci_hcd_mod_exit(void) | |||
1014 | platform_driver_unregister(&PLATFORM_DRIVER); | 1021 | platform_driver_unregister(&PLATFORM_DRIVER); |
1015 | #endif | 1022 | #endif |
1016 | #ifdef PS3_SYSTEM_BUS_DRIVER | 1023 | #ifdef PS3_SYSTEM_BUS_DRIVER |
1017 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | 1024 | if (firmware_has_feature(FW_FEATURE_PS3_LV1)) |
1025 | ps3_system_bus_driver_unregister(&PS3_SYSTEM_BUS_DRIVER); | ||
1018 | #endif | 1026 | #endif |
1019 | } | 1027 | } |
1020 | module_exit(ohci_hcd_mod_exit); | 1028 | module_exit(ohci_hcd_mod_exit); |