]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
serial: zynq: Use live-tree functions
authorMichal Simek <michal.simek@xilinx.com>
Wed, 16 May 2018 08:56:43 +0000 (10:56 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 31 May 2018 11:50:39 +0000 (13:50 +0200)
Use live-tree functions.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/serial/serial_zynq.c

index 06f0a48e670939d4197105878659eef554bae843..3650af21573122e48d82685ec12622af8f9cc143 100644 (file)
@@ -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;
 }