summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-05-12 19:26:45 +0200
committerWolfgang Denk <wd@denx.de>2011-05-12 19:26:45 +0200
commit162eee41060896af666c70ae308d2bb13d971ccf (patch)
tree80463960431e5e2c57bc329f53fe18ec9f6b1870 /drivers
parent8b6bbe104f908296722248eb1a430bc45d628fcf (diff)
parent2e73808ee97d75400881d1fe144b062f427cfcb9 (diff)
downloadu-boot-imx-162eee41060896af666c70ae308d2bb13d971ccf.zip
u-boot-imx-162eee41060896af666c70ae308d2bb13d971ccf.tar.gz
u-boot-imx-162eee41060896af666c70ae308d2bb13d971ccf.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/mxc_gpio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/mxc_gpio.c b/drivers/gpio/mxc_gpio.c
index 1037862..6efbb02 100644
--- a/drivers/gpio/mxc_gpio.c
+++ b/drivers/gpio/mxc_gpio.c
@@ -24,6 +24,7 @@
#include <asm/arch/imx-regs.h>
#include <asm/io.h>
#include <mxc_gpio.h>
+#include <errno.h>
/* GPIO port description */
static unsigned long gpio_ports[] = {
@@ -47,7 +48,7 @@ int mxc_gpio_direction(unsigned int gpio, enum mxc_gpio_direction direction)
u32 l;
if (port >= ARRAY_SIZE(gpio_ports))
- return 1;
+ return -EINVAL;
gpio &= 0x1f;
@@ -95,7 +96,7 @@ int mxc_gpio_get(unsigned int gpio)
u32 l;
if (port >= ARRAY_SIZE(gpio_ports))
- return -1;
+ return -EINVAL;
gpio &= 0x1f;