Skip to content

Commit

Permalink
ARM: at91/usbh: fix overcurrent gpio setup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johan Hovold authored and Nicolas Ferre committed Nov 16, 2012
1 parent 097965e commit 641f3ce
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/at91rm9200_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/at91sam9260_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/at91sam9261_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/at91sam9263_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,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);
}

Expand Down

0 comments on commit 641f3ce

Please sign in to comment.