]> 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Apr 2012 16:13:54 +0000 (09:13 -0700)
commit 1e7caf8bcf1b49eae152ad7cf442775472dd587c upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-at91.c

index 77afabc77f9be8d71fd4502bd5f315d9c8bd2c40..70b96ec0b5dd27af1379c03604fb32ee20f6e8d3 100644 (file)
@@ -245,7 +245,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)
@@ -257,7 +257,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];
 }
 
 /*