summaryrefslogtreecommitdiff
path: root/drivers/clk/at91
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2020-08-04 14:14:43 +0900
committerSimon Glass <sjg@chromium.org>2020-08-22 08:53:37 -0600
commit702e57e113d85fef60ebe9e5c87194414666cfac (patch)
tree58d9823923bb1af7b116e3b47b537769f0719cd7 /drivers/clk/at91
parent1450bff3e4719d1b34189bf62ad19d0e3c10a548 (diff)
downloadu-boot-702e57e113d85fef60ebe9e5c87194414666cfac.tar.gz
u-boot-702e57e113d85fef60ebe9e5c87194414666cfac.tar.bz2
u-boot-702e57e113d85fef60ebe9e5c87194414666cfac.zip
treewide: convert devfdt_get_addr_ptr() to dev_read_addr_ptr()
When you enable CONFIG_OF_LIVE, you will end up with a lot of conversions. To help this tedious work, this commit converts devfdt_get_addr_ptr() to dev_read_addr_ptr() by coccinelle. I also removed redundant casts because dev_read_addr_ptr() returns an opaque pointer. To generate this commit, I ran the following semantic patch excluding include/dm/. <smpl> @@ type T; expression dev; @@ -(T *)devfdt_get_addr_ptr(dev) +dev_read_addr_ptr(dev) @@ expression dev; @@ -devfdt_get_addr_ptr(dev) +dev_read_addr_ptr(dev) </smpl> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/clk/at91')
-rw-r--r--drivers/clk/at91/pmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/at91/pmc.c b/drivers/clk/at91/pmc.c
index 54ae0d281d..ca90abef2d 100644
--- a/drivers/clk/at91/pmc.c
+++ b/drivers/clk/at91/pmc.c
@@ -41,7 +41,7 @@ int at91_pmc_core_probe(struct udevice *dev)
dev = dev_get_parent(dev);
- plat->reg_base = (struct at91_pmc *)devfdt_get_addr_ptr(dev);
+ plat->reg_base = dev_read_addr_ptr(dev);
return 0;
}
@@ -116,7 +116,7 @@ int at91_clk_probe(struct udevice *dev)
dev_periph_container = dev_get_parent(dev);
dev_pmc = dev_get_parent(dev_periph_container);
- plat->reg_base = (struct at91_pmc *)devfdt_get_addr_ptr(dev_pmc);
+ plat->reg_base = dev_read_addr_ptr(dev_pmc);
return 0;
}