]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers: psci: Allow PSCI node to be disabled
authorThierry Reding <treding@nvidia.com>
Tue, 8 Nov 2016 17:55:47 +0000 (17:55 +0000)
committerArnd Bergmann <arnd@arndb.de>
Fri, 25 Nov 2016 22:26:05 +0000 (23:26 +0100)
Allow disabling PSCI support (mostly for testing purposes) by setting
the status property to "disabled". This makes the node behave in much
the same way as proper device nodes.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/firmware/psci.c

index 8263429e21b8dd5b6801a4c2758e5a054568e4c7..6c60a5087cafb885ea7c79fb6e60b6dd026639e4 100644 (file)
@@ -630,7 +630,7 @@ int __init psci_dt_init(void)
 
        np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
 
-       if (!np)
+       if (!np || !of_device_is_available(np))
                return -ENODEV;
 
        init_fn = (psci_initcall_t)matched_np->data;