summaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91/at91sam9261_devices.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2012-11-14 15:18:17 +0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-11-16 13:46:29 +0400
commit641f3ce64b050961d454a0716bb6dbf528315aac (patch)
treee1ee172f0ae0697cfed0cfa76ad7b32747c6def0 /arch/arm/mach-at91/at91sam9261_devices.c
parent097965ee447e5ccec9776f9b075e64cf7607e5eb (diff)
downloadlinux-641f3ce64b050961d454a0716bb6dbf528315aac.tar.xz
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);
}