diff options
author | Christophe Leroy <christophe.leroy@csgroup.eu> | 2023-12-14 13:31:52 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2024-03-03 14:20:29 +0300 |
commit | 2a066ae11861257223500d7515e1541199cb7832 (patch) | |
tree | dbe75a718936405c2407299aa9393ed0a4c54fad /arch/powerpc/kernel/secure_boot.c | |
parent | 28da734d58c8d0113d0ac4f59880d94c9f249564 (diff) | |
download | linux-2a066ae11861257223500d7515e1541199cb7832.tar.xz |
powerpc: Stop using of_root
Replace all usages of of_root by of_find_node_by_path("/")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231214103152.12269-5-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/kernel/secure_boot.c')
-rw-r--r-- | arch/powerpc/kernel/secure_boot.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/secure_boot.c b/arch/powerpc/kernel/secure_boot.c index f9af305d9579..9e0efb657f39 100644 --- a/arch/powerpc/kernel/secure_boot.c +++ b/arch/powerpc/kernel/secure_boot.c @@ -32,8 +32,10 @@ bool is_ppc_secureboot_enabled(void) if (enabled) goto out; - if (!of_property_read_u32(of_root, "ibm,secure-boot", &secureboot)) + node = of_find_node_by_path("/"); + if (!of_property_read_u32(node, "ibm,secure-boot", &secureboot)) enabled = (secureboot > 1); + of_node_put(node); out: pr_info("Secure boot mode %s\n", enabled ? "enabled" : "disabled"); @@ -54,8 +56,10 @@ bool is_ppc_trustedboot_enabled(void) if (enabled) goto out; - if (!of_property_read_u32(of_root, "ibm,trusted-boot", &trustedboot)) + node = of_find_node_by_path("/"); + if (!of_property_read_u32(node, "ibm,trusted-boot", &trustedboot)) enabled = (trustedboot > 0); + of_node_put(node); out: pr_info("Trusted boot mode %s\n", enabled ? "enabled" : "disabled"); |