aboutsummaryrefslogtreecommitdiff
path: root/drivers/timer
diff options
context:
space:
mode:
authorMichal Simek2018-05-16 10:56:09 +0200
committerMichal Simek2018-05-31 13:50:39 +0200
commit72b88103bb9b6bf8f4e9864200bb1811e32f878c (patch)
treee5459661b493852162176bf3a7ddb9182559fe6b /drivers/timer
parentf01ef0ae63fa82ac1a73d5e3d70e7dbc38b18a7d (diff)
timer: cadence: Use live-tree functions
Use live-tree functions. Reported-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/timer')
-rw-r--r--drivers/timer/cadence-ttc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/timer/cadence-ttc.c b/drivers/timer/cadence-ttc.c
index 5b91c8a90b3..3541e5c8412 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;
}