mmc: ca_dw_mmc: Misc cleanup of driver
[oweals/u-boot.git] / drivers / gpio / adi_gpio2.c
index 88cd65b87fcfa202d941d66c531da7e62426410e..d0849c85c3bc38f90f355479e12620b6c979b33b 100644 (file)
@@ -8,7 +8,9 @@
  */
 
 #include <common.h>
-#include <asm/errno.h>
+#include <malloc.h>
+#include <linux/bug.h>
+#include <linux/errno.h>
 #include <asm/gpio.h>
 
 #define RESOURCE_LABEL_SIZE    16
@@ -138,7 +140,7 @@ int peripheral_request(unsigned short per, const char *label)
                return 0;
 
        if (!(per & P_DEFINED))
-               return -ENODEV;
+               return -EINVAL;
 
        BUG_ON(ident >= MAX_RESOURCES);