sdhci: tegra: Enabling regulator when card is present
vjagadish [Wed, 1 Feb 2012 13:05:22 +0000 (18:05 +0530)]
Enable the regulator with out any dependency on slot
regulator

Bug 932739

Signed-off-by: vjagadish <vjagadish@nvidia.com>
Reviewed-on: http://git-master/r/78745
(cherry picked from commit 83d256fe3c269f59436a7cc08e46235ab5c067c8)

Change-Id: I80fbaef6b76fd4bb7990c29499a62abfe46e5150
Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-on: http://git-master/r/82711
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

drivers/mmc/host/sdhci-tegra.c

index 344f9af..95c8cad 100644 (file)
@@ -775,14 +775,14 @@ static int __devinit sdhci_tegra_probe(struct platform_device *pdev)
                        dev_err(mmc_dev(host->mmc), "%s regulator not found: %ld\n",
                                "vddio_sd_slot", PTR_ERR(tegra_host->vdd_slot_reg));
                        tegra_host->vdd_slot_reg = NULL;
-               } else {
-                       if (tegra_host->card_present) {
-                               if (tegra_host->vdd_slot_reg)
-                                       regulator_enable(tegra_host->vdd_slot_reg);
-                               if (tegra_host->vdd_io_reg)
-                                       regulator_enable(tegra_host->vdd_io_reg);
-                               tegra_host->is_rail_enabled = 1;
-                       }
+               }
+
+               if (tegra_host->card_present) {
+                       if (tegra_host->vdd_slot_reg)
+                               regulator_enable(tegra_host->vdd_slot_reg);
+                       if (tegra_host->vdd_io_reg)
+                               regulator_enable(tegra_host->vdd_io_reg);
+                       tegra_host->is_rail_enabled = 1;
                }
        }