From 000b611ebfc38d4f173bf49ba7b9c1ab05c646c2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 18 Dec 2023 19:11:14 +0000 Subject: [PATCH] Revert "mmc: core: add helpers mmc_regulator_enable/disable_vqmmc" This reverts commit a1f29e995fd7957c6fc1c898a6f22c24bf3524c8 which is commit 8d91f3f8ae57e6292142ca89f322e90fa0d6ac02 upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I80d2d352368f49f148db0b68ae1ea6c8f432cb98 Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/regulator.c | 41 ------------------------------------ include/linux/mmc/host.h | 3 --- 2 files changed, 44 deletions(-) diff --git a/drivers/mmc/core/regulator.c b/drivers/mmc/core/regulator.c index 327032cbbb1f..b6febbcf8978 100644 --- a/drivers/mmc/core/regulator.c +++ b/drivers/mmc/core/regulator.c @@ -258,44 +258,3 @@ int mmc_regulator_get_supply(struct mmc_host *mmc) return 0; } EXPORT_SYMBOL_GPL(mmc_regulator_get_supply); - -/** - * mmc_regulator_enable_vqmmc - enable VQMMC regulator for a host - * @mmc: the host to regulate - * - * Returns 0 or errno. Enables the regulator for vqmmc. - * Keeps track of the enable status for ensuring that calls to - * regulator_enable/disable are balanced. - */ -int mmc_regulator_enable_vqmmc(struct mmc_host *mmc) -{ - int ret = 0; - - if (!IS_ERR(mmc->supply.vqmmc) && !mmc->vqmmc_enabled) { - ret = regulator_enable(mmc->supply.vqmmc); - if (ret < 0) - dev_err(mmc_dev(mmc), "enabling vqmmc regulator failed\n"); - else - mmc->vqmmc_enabled = true; - } - - return ret; -} -EXPORT_SYMBOL_GPL(mmc_regulator_enable_vqmmc); - -/** - * mmc_regulator_disable_vqmmc - disable VQMMC regulator for a host - * @mmc: the host to regulate - * - * Returns 0 or errno. Disables the regulator for vqmmc. - * Keeps track of the enable status for ensuring that calls to - * regulator_enable/disable are balanced. - */ -void mmc_regulator_disable_vqmmc(struct mmc_host *mmc) -{ - if (!IS_ERR(mmc->supply.vqmmc) && mmc->vqmmc_enabled) { - regulator_disable(mmc->supply.vqmmc); - mmc->vqmmc_enabled = false; - } -} -EXPORT_SYMBOL_GPL(mmc_regulator_disable_vqmmc); diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 8e40d3aba57f..f4d9bfe0ed26 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -407,7 +407,6 @@ struct mmc_host { unsigned int use_blk_mq:1; /* use blk-mq */ unsigned int retune_crc_disable:1; /* don't trigger retune upon crc */ unsigned int can_dma_map_merge:1; /* merging can be used */ - unsigned int vqmmc_enabled:1; /* vqmmc regulator is enabled */ int rescan_disable; /* disable card detection */ int rescan_entered; /* used with nonremovable devices */ @@ -552,8 +551,6 @@ static inline int mmc_regulator_set_vqmmc(struct mmc_host *mmc, #endif int mmc_regulator_get_supply(struct mmc_host *mmc); -int mmc_regulator_enable_vqmmc(struct mmc_host *mmc); -void mmc_regulator_disable_vqmmc(struct mmc_host *mmc); static inline int mmc_card_is_removable(struct mmc_host *host) {