summaryrefslogtreecommitdiff
path: root/drivers/pwm/sunxi_pwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pwm/sunxi_pwm.c')
-rw-r--r--drivers/pwm/sunxi_pwm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pwm/sunxi_pwm.c b/drivers/pwm/sunxi_pwm.c
index 56215dbf6c..e2ae1a8009 100644
--- a/drivers/pwm/sunxi_pwm.c
+++ b/drivers/pwm/sunxi_pwm.c
@@ -152,7 +152,7 @@ static int sunxi_pwm_ofdata_to_platdata(struct udevice *dev)
{
struct sunxi_pwm_priv *priv = dev_get_priv(dev);
- priv->regs = (struct sunxi_pwm *)devfdt_get_addr(dev);
+ priv->regs = dev_read_addr_ptr(dev);
return 0;
}