summaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91/at91rm9200_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/at91rm9200_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/at91rm9200_devices.c')
-rw-r--r--arch/arm/mach-at91/at91rm9200_devices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91rm9200_devices.c b/arch/arm/mach-at91/at91rm9200_devices.c
index 1e122bcd7845..3cee0e6ea7c3 100644
--- a/arch/arm/mach-at91/at91rm9200_devices.c
+++ b/arch/arm/mach-at91/at91rm9200_devices.c
@@ -68,7 +68,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);
}