Skip to content

Commit

Permalink
USB: ohci-at91: fix vbus_pin_active_low handling
Browse files Browse the repository at this point in the history
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+]
  • Loading branch information
Nicolas Ferre committed Apr 4, 2012
1 parent 7bd9523 commit 1e7caf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/host/ohci-at91.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int
return;

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)
Expand All @@ -259,7 +259,7 @@ static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port)
return -EINVAL;

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

/*
Expand Down

0 comments on commit 1e7caf8

Please sign in to comment.