diff options
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 10 |
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) | |||
570 | 570 | ||
571 | if (pdata) { | 571 | if (pdata) { |
572 | at91_for_each_port(i) { | 572 | at91_for_each_port(i) { |
573 | /* | ||
574 | * do not configure PIO if not in relation with | ||
575 | * real USB port on board | ||
576 | */ | ||
577 | if (i >= pdata->ports) { | ||
578 | pdata->vbus_pin[i] = -EINVAL; | ||
579 | pdata->overcurrent_pin[i] = -EINVAL; | ||
580 | break; | ||
581 | } | ||
582 | |||
573 | if (!gpio_is_valid(pdata->vbus_pin[i])) | 583 | if (!gpio_is_valid(pdata->vbus_pin[i])) |
574 | continue; | 584 | continue; |
575 | gpio = pdata->vbus_pin[i]; | 585 | gpio = pdata->vbus_pin[i]; |