提交 1e7caf8b 编写于 作者: N Nicolas Ferre

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: NNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: NJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: NAlan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@vger.kernel.org>		[3.2+]
上级 7bd95239
...@@ -247,7 +247,7 @@ static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int ...@@ -247,7 +247,7 @@ static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int
return; return;
gpio_set_value(pdata->vbus_pin[port], gpio_set_value(pdata->vbus_pin[port],
!pdata->vbus_pin_active_low[port] ^ enable); pdata->vbus_pin_active_low[port] ^ enable);
} }
static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port) 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,7 +259,7 @@ static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port)
return -EINVAL; return -EINVAL;
return gpio_get_value(pdata->vbus_pin[port]) ^ return gpio_get_value(pdata->vbus_pin[port]) ^
!pdata->vbus_pin_active_low[port]; pdata->vbus_pin_active_low[port];
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册