diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2016-02-11 13:59:55 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-05-02 10:33:09 +0200 |
commit | 33a31ceaf064cd62bf08e437b5849684da2ffe71 (patch) | |
tree | a4052204f213e2f55a5d7089c9fcce5cc9f445f6 /drivers/mmc/host/sh_mmcif.c | |
parent | 4caf653a55210dfc1c024d88e5148148f64802ad (diff) | |
download | linux-stable-33a31ceaf064cd62bf08e437b5849684da2ffe71.tar.gz linux-stable-33a31ceaf064cd62bf08e437b5849684da2ffe71.tar.bz2 linux-stable-33a31ceaf064cd62bf08e437b5849684da2ffe71.zip |
mmc: sh_mmci: Get rid of wrapper function for regulators
As there are two callers of sh_mmcif_set_power() and because its only
additional action is to check for a valid regulator, let's just remove it.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/sh_mmcif.c')
-rw-r--r-- | drivers/mmc/host/sh_mmcif.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index cdefb01b4479..dd64b8663984 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -1063,16 +1063,6 @@ static void sh_mmcif_clk_setup(struct sh_mmcif_host *host) host->mmc->f_max, host->mmc->f_min); } -static void sh_mmcif_set_power(struct sh_mmcif_host *host, struct mmc_ios *ios) -{ - struct mmc_host *mmc = host->mmc; - - if (!IS_ERR(mmc->supply.vmmc)) - /* Errors ignored... */ - mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, - ios->power_mode ? ios->vdd : 0); -} - static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) { struct sh_mmcif_host *host = mmc_priv(mmc); @@ -1092,7 +1082,8 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) switch (ios->power_mode) { case MMC_POWER_UP: - sh_mmcif_set_power(host, ios); + if (!IS_ERR(mmc->supply.vmmc)) + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd); if (!host->power) { clk_prepare_enable(host->clk); pm_runtime_get_sync(dev); @@ -1102,7 +1093,8 @@ static void sh_mmcif_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) } break; case MMC_POWER_OFF: - sh_mmcif_set_power(host, ios); + if (!IS_ERR(mmc->supply.vmmc)) + mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0); if (host->power) { sh_mmcif_clock_control(host, 0); sh_mmcif_release_dma(host); |