diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2023-03-11 23:27:18 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2023-03-23 11:36:34 +0100 |
commit | 2c52e002693dc51a789f54ce72e2f639d7cb1067 (patch) | |
tree | 2ec91e6a3daf55380cf67cc253ffb8daf624de46 | |
parent | 51dfc6142acecfea9bf2041ccadbc3438e31af56 (diff) | |
download | linux-2c52e002693dc51a789f54ce72e2f639d7cb1067.tar.gz |
mmc: meson-gx: simplify usage of mmc_regulator_set_ocr
After 087592395a96 ("mmc: core: Allow invalid regulator in
mmc_regulator_set_ocr()") we can remove the checks here.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/858a592b-ebf4-99b4-74fc-21b4ad3382f8@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r-- | drivers/mmc/host/meson-gx-mmc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index 2b963a81c2ad..28e04dc4efb6 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -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); @@ -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; |