summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/lparcfg.c
diff options
context:
space:
mode:
authorChristophe Leroy <christophe.leroy@csgroup.eu>2023-12-14 13:31:52 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2024-03-03 14:20:29 +0300
commit2a066ae11861257223500d7515e1541199cb7832 (patch)
treedbe75a718936405c2407299aa9393ed0a4c54fad /arch/powerpc/platforms/pseries/lparcfg.c
parent28da734d58c8d0113d0ac4f59880d94c9f249564 (diff)
downloadlinux-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/platforms/pseries/lparcfg.c')
-rw-r--r--arch/powerpc/platforms/pseries/lparcfg.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/lparcfg.c b/arch/powerpc/platforms/pseries/lparcfg.c
index 1c151d77e74b..f73c4d1c26af 100644
--- a/arch/powerpc/platforms/pseries/lparcfg.c
+++ b/arch/powerpc/platforms/pseries/lparcfg.c
@@ -346,9 +346,13 @@ static int read_rtas_lpar_name(struct seq_file *m)
*/
static int read_dt_lpar_name(struct seq_file *m)
{
+ struct device_node *root = of_find_node_by_path("/");
const char *name;
+ int ret;
- if (of_property_read_string(of_root, "ibm,partition-name", &name))
+ ret = of_property_read_string(root, "ibm,partition-name", &name);
+ of_node_put(root);
+ if (ret)
return -ENOENT;
seq_printf(m, "partition_name=%s\n", name);