]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: ohci-at91: fix vbus_pin_active_low handling
authorNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 21 Mar 2012 13:38:55 +0000 (14:38 +0100)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 4 Apr 2012 16:34:43 +0000 (18:34 +0200)
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+]
drivers/usb/host/ohci-at91.c

index db8963f5fbcec11988390b32e02a693c787e2727..4d266ae5152d6f09f85f2ffb709365976f3d312c 100644 (file)
@@ -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)
@@ -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];
 }
 
 /*