diff options
Diffstat (limited to 'arch/arm/mach-u300/gpio.c')
-rw-r--r-- | arch/arm/mach-u300/gpio.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-u300/gpio.c b/arch/arm/mach-u300/gpio.c index 63c8f27fb15a..0b35826b7d1d 100644 --- a/arch/arm/mach-u300/gpio.c +++ b/arch/arm/mach-u300/gpio.c | |||
@@ -281,6 +281,16 @@ int gpio_unregister_callback(unsigned gpio) | |||
281 | } | 281 | } |
282 | EXPORT_SYMBOL(gpio_unregister_callback); | 282 | EXPORT_SYMBOL(gpio_unregister_callback); |
283 | 283 | ||
284 | /* Non-zero means valid */ | ||
285 | int gpio_is_valid(int number) | ||
286 | { | ||
287 | if (number >= 0 && | ||
288 | number < (U300_GPIO_NUM_PORTS * U300_GPIO_PINS_PER_PORT)) | ||
289 | return 1; | ||
290 | return 0; | ||
291 | } | ||
292 | EXPORT_SYMBOL(gpio_is_valid); | ||
293 | |||
284 | int gpio_request(unsigned gpio, const char *label) | 294 | int gpio_request(unsigned gpio, const char *label) |
285 | { | 295 | { |
286 | if (gpio_pin[gpio].users) | 296 | if (gpio_pin[gpio].users) |