summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorManoj Chourasia <mchourasia@nvidia.com>2011-12-15 16:12:40 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-22 11:29:42 +0530
commit44e47dbd52e01214c9cbfad213669bb90d5efa2e (patch)
tree5dd2cfda8f2efafadd24970749137e3be88d54b4 /arch
parent5a6654837203ad75c679169d89ed55fa7a83c148 (diff)
arm: tegra: usb: Fix usb crashing issue on p1852
USB driver should not give-up in case if it doesn't get the required regulator supply. And it should operate only in case phy regulator is not NULL. bug 916334 Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com> Reviewed-on: http://git-master/r/70283 (cherry picked from commit 7e0fa3da23f06f992c462e098c8d7fd762cb91e8) Change-Id: I97f65e10222fc490c9218f7cb4af922ca72b84a9 Reviewed-on: http://git-master/r/71624 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/usb_phy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/usb_phy.c b/arch/arm/mach-tegra/usb_phy.c
index 9ba8b68297ea..bc183959353b 100644
--- a/arch/arm/mach-tegra/usb_phy.c
+++ b/arch/arm/mach-tegra/usb_phy.c
@@ -2221,7 +2221,7 @@ static irqreturn_t usb_phy_vbus_irq_thr(int irq, void *pdata)
{
struct tegra_usb_phy *phy = pdata;
- if (!phy->regulator_on) {
+ if (phy->reg_vdd && !phy->regulator_on) {
regulator_enable(phy->reg_vdd);
phy->regulator_on = 1;
/*
@@ -2365,11 +2365,10 @@ struct tegra_usb_phy *tegra_usb_phy_open(int instance, void __iomem *regs,
#endif
phy->reg_vdd = regulator_get(NULL, "avdd_usb");
- if (WARN_ON(IS_ERR_OR_NULL(phy->reg_vdd))) {
+ if (IS_ERR_OR_NULL(phy->reg_vdd)) {
pr_err("couldn't get regulator avdd_usb: %ld \n",
PTR_ERR(phy->reg_vdd));
- err = PTR_ERR(phy->reg_vdd);
- goto err1;
+ phy->reg_vdd = NULL;
}
if (instance == 0 && usb_phy_data[0].vbus_irq) {