summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9260_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/at91sam9260_devices.c
parent097965ee447e5ccec9776f9b075e64cf7607e5eb (diff)
downloadblackbird-op-linux-641f3ce64b050961d454a0716bb6dbf528315aac.tar.gz
blackbird-op-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/at91sam9260_devices.c')
-rw-r--r--arch/arm/mach-at91/at91sam9260_devices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9260_devices.c b/arch/arm/mach-at91/at91sam9260_devices.c
index aa1e58729885..414bd855fb0c 100644
--- a/arch/arm/mach-at91/at91sam9260_devices.c
+++ b/arch/arm/mach-at91/at91sam9260_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);
}
OpenPOWER on IntegriCloud