diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-02-22 10:43:12 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-08 23:03:23 -0500 |
commit | 8170f524894b17a3f36351fe0e1a3fb6aca733ee (patch) | |
tree | 0cbc94fe9c15f9a17a37895ddd525926d1bf3c46 /arch/powerpc | |
parent | 02567c6cdad4d6254052f25f3b93aa2771f48d25 (diff) |
[POWERPC] ps3: always make sure we're running on a PS3
Add missing checks to PS3 specific drivers ps3av and sys-manager to verify that
we are actually running on a PS3 (pointed out by Arnd).
Correct existing checks in other subsystems/drivers to return -ENODEV instead
of zero.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/platforms/ps3/mm.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/ps3/system-bus.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/ps3/mm.c b/arch/powerpc/platforms/ps3/mm.c index 42354de3f557..2014d2b44449 100644 --- a/arch/powerpc/platforms/ps3/mm.c +++ b/arch/powerpc/platforms/ps3/mm.c | |||
@@ -294,7 +294,7 @@ static int __init ps3_mm_add_memory(void) | |||
294 | unsigned long nr_pages; | 294 | unsigned long nr_pages; |
295 | 295 | ||
296 | if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) | 296 | if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) |
297 | return 0; | 297 | return -ENODEV; |
298 | 298 | ||
299 | BUG_ON(!mem_init_done); | 299 | BUG_ON(!mem_init_done); |
300 | 300 | ||
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index a9f7e4a39a2a..3c48cce98a5c 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -172,7 +172,7 @@ int __init ps3_system_bus_init(void) | |||
172 | int result; | 172 | int result; |
173 | 173 | ||
174 | if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) | 174 | if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) |
175 | return 0; | 175 | return -ENODEV; |
176 | 176 | ||
177 | result = bus_register(&ps3_system_bus_type); | 177 | result = bus_register(&ps3_system_bus_type); |
178 | BUG_ON(result); | 178 | BUG_ON(result); |