diff mbox series

mmc: meson-gx: simplify usage of mmc_regulator_set_ocr

Message ID 858a592b-ebf4-99b4-74fc-21b4ad3382f8@gmail.com (mailing list archive)
State New, archived
Headers show
Series mmc: meson-gx: simplify usage of mmc_regulator_set_ocr | expand

Commit Message

Heiner Kallweit March 11, 2023, 10:27 p.m. UTC
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>
---
 drivers/mmc/host/meson-gx-mmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Martin Blumenstingl March 12, 2023, 8:20 p.m. UTC | #1
On Sat, Mar 11, 2023 at 11:27 PM Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> 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>
Ulf Hansson March 23, 2023, 12:12 p.m. UTC | #2
On Sat, 11 Mar 2023 at 23:27, Heiner Kallweit <hkallweit1@gmail.com> wrote:
>
> 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>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/meson-gx-mmc.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
> index 2b963a81c..28e04dc4e 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;
>
> --
> 2.39.2
>
diff mbox series

Patch

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 2b963a81c..28e04dc4e 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;