rockchip: pwm: convert to use live dt
authorKever Yang <kever.yang@rock-chips.com>
Thu, 8 Feb 2018 13:15:21 +0000 (21:15 +0800)
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tue, 13 Mar 2018 17:12:35 +0000 (18:12 +0100)
use live dt api to get base addr

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
drivers/pwm/rk_pwm.c

index 2364c2dfddc9ad9473ed5196a5dde120a432ded4..7d3e11d667412d5b4dc966232cf7d330600a975e 100644 (file)
@@ -76,7 +76,7 @@ static int rk_pwm_ofdata_to_platdata(struct udevice *dev)
 {
        struct rk_pwm_priv *priv = dev_get_priv(dev);
 
-       priv->regs = (struct rk3288_pwm *)devfdt_get_addr(dev);
+       priv->regs = (struct rk3288_pwm *)dev_read_addr(dev);
 
        return 0;
 }