From: Thierry Reding Date: Tue, 8 Nov 2016 17:55:47 +0000 (+0000) Subject: drivers: psci: Allow PSCI node to be disabled X-Git-Tag: v4.10-rc1~80^2~8 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=d09a0011ec0d511b51d6378a071fd8d75eb27622;p=linux.git drivers: psci: Allow PSCI node to be disabled 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 Signed-off-by: Lorenzo Pieralisi Acked-by: Mark Rutland Signed-off-by: Arnd Bergmann --- diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c index 8263429e21b8..6c60a5087caf 100644 --- a/drivers/firmware/psci.c +++ b/drivers/firmware/psci.c @@ -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;