diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-11-28 07:42:42 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-11-28 15:21:27 +0100 |
commit | 604aff317876d15ba1618b89f359b0b71481fdfb (patch) | |
tree | bfef7f685c4356d858be42de74591105dfbba7da /include/asm-generic | |
parent | 21c31b9de2f0343c56aa2abac3b324cf21a5d02e (diff) | |
download | barebox-604aff317876d15ba1618b89f359b0b71481fdfb.tar.gz barebox-604aff317876d15ba1618b89f359b0b71481fdfb.tar.xz |
gpio: move gpio_is_valid to include/gpio.h
No architectue implements its own gpio_is_valid() function, so move
the only existing implementation to include/gpio.h where it's available
for all users.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/gpio.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h index 95fdd05ec9..767497096a 100644 --- a/include/asm-generic/gpio.h +++ b/include/asm-generic/gpio.h @@ -1,17 +1,6 @@ #ifndef __ASM_GENERIC_GPIO_H #define __ASM_GENERIC_GPIO_H -#define ARCH_NR_GPIOS 256 - -static inline int gpio_is_valid(int gpio) -{ - if (gpio < 0) - return 0; - if (gpio < ARCH_NR_GPIOS) - return 1; - return 0; -} - void gpio_set_value(unsigned gpio, int value); int gpio_get_value(unsigned gpio); int gpio_direction_output(unsigned gpio, int value); |