diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-05 13:55:03 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-05 13:55:03 +0100 |
commit | 4c5f830c4c9d4f19c1eef356c0cd322b46d695c9 (patch) | |
tree | a14ad6c652736bb28859a7aec392a01b236ae58d /drivers/usb/host/ohci-at91.c | |
parent | ARM: 7257/1: EXYNOS: introduce arch/arm/mach-exynos/common.[ch] (diff) | |
parent | arm: Remove plat-tcc directory (diff) | |
download | linux-4c5f830c4c9d4f19c1eef356c0cd322b46d695c9.tar.xz linux-4c5f830c4c9d4f19c1eef356c0cd322b46d695c9.zip |
Merge branch 'for-russell' of git://hansjkoch.de/git/linux-tcc into HEAD
Conflicts:
arch/arm/plat-omap/include/plat/common.h
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r-- | drivers/usb/host/ohci-at91.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index ba3a46b78b75..95a9fec38e89 100644 --- a/drivers/usb/host/ohci-at91.c +++ b/drivers/usb/host/ohci-at91.c @@ -223,6 +223,9 @@ static void ohci_at91_usb_set_power(struct at91_usbh_data *pdata, int port, int if (port < 0 || port >= 2) return; + if (pdata->vbus_pin[port] <= 0) + return; + gpio_set_value(pdata->vbus_pin[port], !pdata->vbus_pin_inverted ^ enable); } @@ -231,6 +234,9 @@ static int ohci_at91_usb_get_power(struct at91_usbh_data *pdata, int port) if (port < 0 || port >= 2) return -EINVAL; + if (pdata->vbus_pin[port] <= 0) + return -EINVAL; + return gpio_get_value(pdata->vbus_pin[port]) ^ !pdata->vbus_pin_inverted; } |