diff options
author | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-01-08 12:15:45 (GMT) |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2013-01-08 12:15:45 (GMT) |
commit | 79f38777947ac7685e2cef8bd977f954ab198c0e (patch) | |
tree | 6fe053ef751b1c424ec50be338844197b6421d74 /drivers/gpio | |
parent | 96764df1b47ddebfb50fadf5af72530b07b5fc89 (diff) | |
parent | 9bd5c1ad0db802c9f8d49d72b443f03431cf6a89 (diff) | |
download | u-boot-fsl-qoriq-79f38777947ac7685e2cef8bd977f954ab198c0e.tar.xz |
Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'
This required manual merging drivers/mtd/nand/Makefile
and adding am335x_evm support for CONFIG_SPL_NAND_DRIVERS
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/omap_gpio.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpio/omap_gpio.c b/drivers/gpio/omap_gpio.c index fc89f2a..a30d7f0 100644 --- a/drivers/gpio/omap_gpio.c +++ b/drivers/gpio/omap_gpio.c @@ -53,18 +53,14 @@ static inline int get_gpio_index(int gpio) return gpio & 0x1f; } -static inline int gpio_valid(int gpio) +int gpio_is_valid(int gpio) { - if (gpio < 0) - return -1; - if (gpio < 192) - return 0; - return -1; + return (gpio >= 0) && (gpio < 192); } static int check_gpio(int gpio) { - if (gpio_valid(gpio) < 0) { + if (!gpio_is_valid(gpio)) { printf("ERROR : check_gpio: invalid GPIO %d\n", gpio); return -1; } |