arm: tegra: USB: correct hsic regulators
Rakesh Bodla [Tue, 18 Sep 2012 16:26:50 +0000 (21:26 +0530)]
Correcting the devices names for hsic
regulators for dalmore. Also fixing potential
kernel crash.

Reviewed-on: http://git-master/r/133585
(cherry picked from commit 2f5cdbe744e3bbc5f31fadcdbc282a2b909056ff)

Change-Id: I5b12d9a8d71f13637cecde633e293badc2930bf6
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/143084
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>

arch/arm/mach-tegra/board-dalmore-power.c
arch/arm/mach-tegra/tegra11x_usb_phy.c

index 22a765a..8fa2e93 100644 (file)
@@ -261,8 +261,8 @@ static struct regulator_consumer_supply max77663_ldo5_supply[] = {
        REGULATOR_SUPPLY("avdd_dsi_csi", "tegradc.0"),
        REGULATOR_SUPPLY("avdd_dsi_csi", "tegradc.1"),
        REGULATOR_SUPPLY("avdd_dsi_csi", "tegra_camera"),
-       REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.0"),
        REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.1"),
+       REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.2"),
        REGULATOR_SUPPLY("pwrdet_mipi", NULL),
        REGULATOR_SUPPLY("vddio_bb_hsic", NULL),
 };
@@ -589,8 +589,8 @@ static struct regulator_consumer_supply palmas_ldo2_supply[] = {
 };
 
 static struct regulator_consumer_supply palmas_ldo3_supply[] = {
-       REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.0"),
        REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.1"),
+       REGULATOR_SUPPLY("vddio_hsic", "tegra-ehci.2"),
        REGULATOR_SUPPLY("vddio_hsic_bb", NULL),
        REGULATOR_SUPPLY("avdd_csi_dsi", "tegradc.0"),
        REGULATOR_SUPPLY("avdd_csi_dsi", "tegradc.1"),
index 212f143..1d3f4fa 100644 (file)
@@ -2085,8 +2085,9 @@ static int uhsic_rail_enable(struct tegra_usb_phy *phy)
                phy->hsic_reg = regulator_get(&phy->pdev->dev, "vddio_hsic");
                if (IS_ERR_OR_NULL(phy->hsic_reg)) {
                        pr_err("UHSIC: Could not get regulator vddio_hsic\n");
+                       ret = PTR_ERR(phy->hsic_reg);
                        phy->hsic_reg = NULL;
-                       return PTR_ERR(phy->hsic_reg);
+                       return ret;
                }
        }