diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-03-09 23:05:38 (GMT) |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-03-09 23:07:51 (GMT) |
commit | ef596c697a4d80048eccf50530153d7e3330c127 (patch) | |
tree | afd1d1cf9c4fc2c53d557a669d0fdba085dc3e35 /drivers/ps3/sys-manager.c | |
parent | 94b2a4393c500a620de90c3266d595926302e26b (diff) | |
download | linux-fsl-qoriq-ef596c697a4d80048eccf50530153d7e3330c127.tar.xz |
[POWERPC] ps3: always make sure were 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>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'drivers/ps3/sys-manager.c')
-rw-r--r-- | drivers/ps3/sys-manager.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/ps3/sys-manager.c b/drivers/ps3/sys-manager.c index 0fc30be..3aa2b0d 100644 --- a/drivers/ps3/sys-manager.c +++ b/drivers/ps3/sys-manager.c @@ -22,7 +22,10 @@ #include <linux/module.h> #include <linux/workqueue.h> #include <linux/reboot.h> + +#include <asm/firmware.h> #include <asm/ps3.h> + #include "vuart.h" MODULE_AUTHOR("Sony Corporation"); @@ -598,6 +601,9 @@ static struct ps3_vuart_port_driver ps3_sys_manager = { static int __init ps3_sys_manager_init(void) { + if (!firmware_has_feature(FW_FEATURE_PS3_LV1)) + return -ENODEV; + return ps3_vuart_port_driver_register(&ps3_sys_manager); } |