summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-at91.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:07:20 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:07:20 -0400
commit5905db5ca0ac9a6d5bfe87f86b87cd1bdec3755a (patch)
tree6edb13ed37d842ef0b70d072b94e4c78010f90cf /drivers/usb/host/ohci-at91.c
parentc5aa1e554a20fb3542c62688ae46049c9225a965 (diff)
parent6f0f9b6b3fcfe5e156f20d4f804f0d505c750b3c (diff)
downloadlinux-5905db5ca0ac9a6d5bfe87f86b87cd1bdec3755a.tar.bz2
Merge remote branch 'origin' into for-next
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r--drivers/usb/host/ohci-at91.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index a665b3eaa746..aaa8d2bce217 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -570,6 +570,16 @@ static int __devinit ohci_hcd_at91_drv_probe(struct platform_device *pdev)
if (pdata) {
at91_for_each_port(i) {
+ /*
+ * do not configure PIO if not in relation with
+ * real USB port on board
+ */
+ if (i >= pdata->ports) {
+ pdata->vbus_pin[i] = -EINVAL;
+ pdata->overcurrent_pin[i] = -EINVAL;
+ break;
+ }
+
if (!gpio_is_valid(pdata->vbus_pin[i]))
continue;
gpio = pdata->vbus_pin[i];