Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275823
b: refs/heads/master
c: 770f0ba
h: refs/heads/master
i:
  275821: de924c1
  275819: 3d2f5b9
  275815: c18c330
  275807: 5667a06
v: v3
  • Loading branch information
Jean-Christophe PLAGNIOL-VILLARD authored and Greg Kroah-Hartman committed Nov 14, 2011
1 parent 4022893 commit 01b3a5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5dc2470c602da8851907ec18942cd876c3b4ecc1
refs/heads/master: 770f0baaee0c511d0d466082e72815ed861e301f
6 changes: 6 additions & 0 deletions trunk/drivers/usb/host/ohci-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int
if (port < 0 || port >= 2)
return;

if (pdata->vbus_pin[port] <= 0)
return;

gpio_set_value(pdata->vbus_pin[port], !pdata->vbus_pin_inverted ^ enable);
}

Expand All @@ -231,6 +234,9 @@ static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port)
if (port < 0 || port >= 2)
return -EINVAL;

if (pdata->vbus_pin[port] <= 0)
return -EINVAL;

return gpio_get_value(pdata->vbus_pin[port]) ^ !pdata->vbus_pin_inverted;
}

Expand Down

0 comments on commit 01b3a5e

Please sign in to comment.