diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-03-21 09:38:55 -0400 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-04-04 12:34:43 -0400 |
commit | 1e7caf8bcf1b49eae152ad7cf442775472dd587c (patch) | |
tree | 436c0e1a515ea6e7435d3d899db744ec6f672e4e /drivers/usb | |
parent | 7bd9523969299f4c845615eade5e523f840dc34c (diff) |
USB: ohci-at91: fix vbus_pin_active_low handling
The information is not properly taken into account
for {get|set}_power() functions.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org> [3.2+]
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index db8963f5fbce..4d266ae5152d 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c | |||
@@ -247,7 +247,7 @@ static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int | |||
247 | return; | 247 | return; |
248 | 248 | ||
249 | gpio_set_value(pdata->vbus_pin[port], | 249 | gpio_set_value(pdata->vbus_pin[port], |
250 | !pdata->vbus_pin_active_low[port] ^ enable); | 250 | pdata->vbus_pin_active_low[port] ^ enable); |
251 | } | 251 | } |
252 | 252 | ||
253 | static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port) | 253 | static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port) |
@@ -259,7 +259,7 @@ static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port) | |||
259 | return -EINVAL; | 259 | return -EINVAL; |
260 | 260 | ||
261 | return gpio_get_value(pdata->vbus_pin[port]) ^ | 261 | return gpio_get_value(pdata->vbus_pin[port]) ^ |
262 | !pdata->vbus_pin_active_low[port]; | 262 | pdata->vbus_pin_active_low[port]; |
263 | } | 263 | } |
264 | 264 | ||
265 | /* | 265 | /* |