From: Michal Simek Date: Wed, 16 May 2018 08:56:43 +0000 (+0200) Subject: serial: zynq: Use live-tree functions X-Git-Tag: v2018.07-rc1~14^2~18 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ce69030eb9d600173d6ce801c3158f685721fe79;p=oweals%2Fu-boot.git serial: zynq: Use live-tree functions Use live-tree functions. Signed-off-by: Michal Simek Reviewed-by: Simon Glass --- diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c index 06f0a48e67..3650af2157 100644 --- a/drivers/serial/serial_zynq.c +++ b/drivers/serial/serial_zynq.c @@ -175,7 +175,9 @@ static int zynq_serial_ofdata_to_platdata(struct udevice *dev) { struct zynq_uart_priv *priv = dev_get_priv(dev); - priv->regs = (struct uart_zynq *)devfdt_get_addr(dev); + priv->regs = (struct uart_zynq *)dev_read_addr(dev); + if (IS_ERR(priv->regs)) + return PTR_ERR(priv->regs); return 0; }