Merge tag 'dm-pull-29oct19' of git://git.denx.de/u-boot-dm
[oweals/u-boot.git] / drivers / spi / ath79_spi.c
index b18c733b670f96b6a2263014a2fb2ce81fc4fea0..207069218f6ce445728f10570f23df33a29da0cd 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2015-2016 Wills Wang <wills.wang@live.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
  */
 
 #include <common.h>
@@ -177,7 +176,7 @@ static int ath79_spi_probe(struct udevice *bus)
        struct ath79_spi_priv *priv = dev_get_priv(bus);
        fdt_addr_t addr;
 
-       addr = dev_get_addr(bus);
+       addr = devfdt_get_addr(bus);
        if (addr == FDT_ADDR_T_NONE)
                return -EINVAL;
 
@@ -199,7 +198,7 @@ static int ath79_cs_info(struct udevice *bus, uint cs,
 {
        /* Always allow activity on CS 0/1/2 */
        if (cs >= 3)
-               return -ENODEV;
+               return -EINVAL;
 
        return 0;
 }