From d3030e872f85e3bca970026aa80557b34e41b1c0 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Fri, 6 May 2011 12:14:10 +0300 Subject: [PATCH] --- yaml --- r: 270295 b: refs/heads/master c: e840ce134ba5c617af97a2adbedefb0a9c0bb5a7 h: refs/heads/master i: 270293: ea4e1234c367b2b46c562b40d90a43377eb7c61f 270291: 52fe76e071ee1f2312e64193bf3db0066d527279 270287: e19a741595d6b078006ae29ac88a01fed898cfd6 v: v3 --- [refs] | 2 +- trunk/drivers/mmc/host/omap_hsmmc.c | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 746e2b9589c7..42eb59f7521f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bec8726abc72bf30d2743a722aa37cd69e7a0580 +refs/heads/master: e840ce134ba5c617af97a2adbedefb0a9c0bb5a7 diff --git a/trunk/drivers/mmc/host/omap_hsmmc.c b/trunk/drivers/mmc/host/omap_hsmmc.c index 3c900f34c13f..bb334be562d7 100644 --- a/trunk/drivers/mmc/host/omap_hsmmc.c +++ b/trunk/drivers/mmc/host/omap_hsmmc.c @@ -450,15 +450,14 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) * framework is fixed, we need a workaround like this * (which is safe for MMC, but not in general). */ - if (regulator_is_enabled(host->vcc) > 0) { - regulator_enable(host->vcc); - regulator_disable(host->vcc); - } - if (host->vcc_aux) { - if (regulator_is_enabled(reg) > 0) { - regulator_enable(reg); - regulator_disable(reg); - } + if (regulator_is_enabled(host->vcc) > 0 || + (host->vcc_aux && regulator_is_enabled(host->vcc_aux))) { + int vdd = ffs(mmc_slot(host).ocr_mask) - 1; + + mmc_slot(host).set_power(host->dev, host->slot_id, + 1, vdd); + mmc_slot(host).set_power(host->dev, host->slot_id, + 0, 0); } }