From: Michal Simek Date: Wed, 16 May 2018 08:56:09 +0000 (+0200) Subject: timer: cadence: Use live-tree functions X-Git-Tag: v2018.07-rc1~14^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72b88103bb9b6bf8f4e9864200bb1811e32f878c;p=platform%2Fkernel%2Fu-boot.git timer: cadence: Use live-tree functions Use live-tree functions. Reported-by: Simon Glass Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c index 5b91c8a..3541e5c 100644 --- a/drivers/timer/cadence-ttc.c +++ b/drivers/timer/cadence-ttc.c @@ -64,8 +64,10 @@ static int cadence_ttc_ofdata_to_platdata(struct udevice *dev) { struct cadence_ttc_priv *priv = dev_get_priv(dev); - priv->regs = map_physmem(devfdt_get_addr(dev), + priv->regs = map_physmem(dev_read_addr(dev), sizeof(struct cadence_ttc_regs), MAP_NOCACHE); + if (IS_ERR(priv->regs)) + return PTR_ERR(priv->regs); return 0; }