diff options
author | Ishizaki Kou <kou.ishizaki@toshiba.co.jp> | 2007-02-14 02:04:17 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-02-15 22:00:20 -0500 |
commit | c243f983a52eca8eb2a73113222887149836d45c (patch) | |
tree | 45fe3b6be83efd184b460995fc438dc5db71bcbc /drivers/usb/host/ohci-hcd.c | |
parent | 89680a8c3c35a3e9a7e97fbe66a34b0a73e221d1 (diff) |
[POWERPC] 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>
Signed-off-by: Paul Mackerras <paulus@samba.org>
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); |