summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/aspeed/clk_ast2500.c6
-rw-r--r--drivers/clk/at91/pmc.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/clk/aspeed/clk_ast2500.c b/drivers/clk/aspeed/clk_ast2500.c
index ccfeded30c..d1940f1884 100644
--- a/drivers/clk/aspeed/clk_ast2500.c
+++ b/drivers/clk/aspeed/clk_ast2500.c
@@ -497,9 +497,9 @@ static int ast2500_clk_ofdata_to_platdata(struct udevice *dev)
{
struct ast2500_clk_priv *priv = dev_get_priv(dev);
- priv->scu = devfdt_get_addr_ptr(dev);
- if (IS_ERR(priv->scu))
- return PTR_ERR(priv->scu);
+ priv->scu = dev_read_addr_ptr(dev);
+ if (!priv->scu)
+ return -EINVAL;
return 0;
}
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;
}