projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b73850f
)
gpio: imx: Fix return value on error
author
Fabio Estevam
<festevam@gmail.com>
Sat, 9 Apr 2011 10:43:24 +0000
(10:43 +0000)
committer
Albert ARIBAUD
<albert.u.boot@aribaud.net>
Wed, 11 May 2011 21:03:15 +0000
(23:03 +0200)
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
drivers/gpio/mxc_gpio.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/mxc_gpio.c
b/drivers/gpio/mxc_gpio.c
index 103786209cfa972b7b17f41285b3070bf04d696c..6efbb02c161931d970d415aaeb223a9e53dd8255 100644
(file)
--- 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;