[U-Boot] [PATCH 1/4] serial: zynq: Use live-tree functions
Michal Simek
michal.simek at xilinx.com
Fri May 18 08:46:13 UTC 2018
Use live-tree functions.
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---
drivers/serial/serial_zynq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 06f0a48e6709..3650af215731 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;
}
--
2.17.0
More information about the U-Boot
mailing list