summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/usb_phy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index fab702a5bd72..532bf73c10d1 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -863,14 +863,14 @@ static void vbus_enable(struct tegra_usb_phy *phy)
WARN_ON(1);
return;
}
- tegra_gpio_enable(gpio);
+ if (gpio < TEGRA_NR_GPIOS) tegra_gpio_enable(gpio);
gpio_status = gpio_direction_output(gpio, 1);
if (gpio_status < 0) {
printk("VBUS_USB request GPIO DIRECTION FAILED \n");
WARN_ON(1);
return;
}
- gpio_set_value(gpio, 1);
+ gpio_set_value_cansleep(gpio, 1);
#else
if (phy->reg_vbus)
regulator_enable(phy->reg_vbus);
@@ -885,7 +885,7 @@ static void vbus_disable(struct tegra_usb_phy *phy)
if (gpio == -1)
return;
- gpio_set_value(gpio, 0);
+ gpio_set_value_cansleep(gpio, 0);
gpio_free(gpio);
#else
if (phy->reg_vbus)