Skip to content

Commit

Permalink
mmc: meson-gx: simplify usage of mmc_regulator_set_ocr
Browse files Browse the repository at this point in the history
After 0875923 ("mmc: core: Allow invalid regulator in
mmc_regulator_set_ocr()") we can remove the checks here.

Signed-off-by: Heiner Kallweit <[email protected]>
Reviewed-by: Martin Blumenstingl <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
hkallweit authored and storulf committed Mar 23, 2023
1 parent 51dfc61 commit 2c52e00
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/mmc/host/meson-gx-mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,7 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
*/
switch (ios->power_mode) {
case MMC_POWER_OFF:
if (!IS_ERR(mmc->supply.vmmc))
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, 0);

if (!IS_ERR(mmc->supply.vqmmc) && host->vqmmc_enabled) {
regulator_disable(mmc->supply.vqmmc);
Expand All @@ -615,8 +614,7 @@ static void meson_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
break;

case MMC_POWER_UP:
if (!IS_ERR(mmc->supply.vmmc))
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);
mmc_regulator_set_ocr(mmc, mmc->supply.vmmc, ios->vdd);

break;

Expand Down

0 comments on commit 2c52e00

Please sign in to comment.