summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9261_devices.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-11-14 12:18:17 +0100
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-11-16 10:46:29 +0100
commit641f3ce64b050961d454a0716bb6dbf528315aac (patch)
treee1ee172f0ae0697cfed0cfa76ad7b32747c6def0 /arch/arm/mach-at91/at91sam9261_devices.c
parentARM: at91/AT91SAM9G45: fix crypto peripherals irq issue due to sparse irq sup... (diff)
downloadlinux-641f3ce64b050961d454a0716bb6dbf528315aac.tar.xz
linux-641f3ce64b050961d454a0716bb6dbf528315aac.zip
ARM: at91/usbh: fix overcurrent gpio setup
Use gpio_is_valid also for overcurrent pins (which are currently negative in many board files). Signed-off-by: Johan Hovold <jhovold@gmail.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9261_devices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9261_devices.c b/arch/arm/mach-at91/at91sam9261_devices.c
index b9487696b7be..cd604aad8e96 100644
--- a/arch/arm/mach-at91/at91sam9261_devices.c
+++ b/arch/arm/mach-at91/at91sam9261_devices.c
@@ -72,7 +72,7 @@ void __init at91_add_device_usbh(struct at91_usbh_data *data)
/* Enable overcurrent notification */
for (i = 0; i < data->ports; i++) {
- if (data->overcurrent_pin[i])
+ if (gpio_is_valid(data->overcurrent_pin[i]))
at91_set_gpio_input(data->overcurrent_pin[i], 1);
}