projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1840ff8
)
mtd: spear_smi: use for_each_child_of_node() macro
author
Qinglang Miao
<miaoqinglang@huawei.com>
Mon, 14 Sep 2020 06:13:24 +0000
(14:13 +0800)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Tue, 15 Sep 2020 08:14:36 +0000
(10:14 +0200)
Use for_each_child_of_node() macro instead of open coding it.
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20200914061324.3230-1-miaoqinglang@huawei.com
drivers/mtd/devices/spear_smi.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/devices/spear_smi.c
b/drivers/mtd/devices/spear_smi.c
index 79dcca16481d1b3103c754952a9ce5196c2acf86..2e00862389dd13051573b2d14ad956e960ca813d 100644
(file)
--- a/
drivers/mtd/devices/spear_smi.c
+++ b/
drivers/mtd/devices/spear_smi.c
@@
-793,7
+793,7
@@
static int spear_smi_probe_config_dt(struct platform_device *pdev,
struct device_node *np)
{
struct spear_smi_plat_data *pdata = dev_get_platdata(&pdev->dev);
- struct device_node *pp
= NULL
;
+ struct device_node *pp;
const __be32 *addr;
u32 val;
int len;
@@
-812,7
+812,7
@@
static int spear_smi_probe_config_dt(struct platform_device *pdev,
return -ENOMEM;
/* Fill structs for each subnode (flash device) */
-
while ((pp = of_get_next_child(np, pp))
) {
+
for_each_child_of_node(np, pp
) {
pdata->np[i] = pp;
/* Read base-addr and size from DT */