projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f755ecf
)
powerpc/prom: Use of_get_next_parent() in of_get_ibm_chip_id()
author
Michael Ellerman
<mpe@ellerman.id.au>
Mon, 26 Oct 2015 00:48:46 +0000
(09:48 +0900)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Wed, 28 Oct 2015 03:08:32 +0000
(12:08 +0900)
Use of_get_next_parent() to simplifiy the logic in of_get_ibm_chip_id().
Original-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/prom.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/powerpc/kernel/prom.c
b/arch/powerpc/kernel/prom.c
index 0b0a4166d69dbbb4fb190535a8f6298700d440ed..7030b035905dbf85b03bd36fa4bdc2a4a14982de 100644
(file)
--- a/
arch/powerpc/kernel/prom.c
+++ b/
arch/powerpc/kernel/prom.c
@@
-784,7
+784,6
@@
int of_get_ibm_chip_id(struct device_node *np)
{
of_node_get(np);
while (np) {
- struct device_node *old = np;
u32 chip_id;
/*
@@
-795,8
+794,8
@@
int of_get_ibm_chip_id(struct device_node *np)
of_node_put(np);
return chip_id;
}
- np = of_get_parent(np);
-
of_node_put(old
);
+
+
np = of_get_next_parent(np
);
}
return -1;
}