spi: ich: Correct max-size bug in ich_spi_adjust_size()
[oweals/u-boot.git] / drivers / spi / ath79_spi.c
index f4b92aae287b32b9dc1e64eee6f20b5c66199288..0b8ebaabe9bb4088c63821c4718b594bb8c4e1b1 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>
@@ -9,6 +8,7 @@
 #include <dm.h>
 #include <div64.h>
 #include <errno.h>
+#include <time.h>
 #include <asm/io.h>
 #include <asm/addrspace.h>
 #include <asm/types.h>
@@ -199,7 +199,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;
 }