]> git.ipfire.org Git - thirdparty/linux.git/commit
mmc: rtsx_usb_sdmmc: Re-work the code in sd_set_power_mode()
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 10 Jun 2025 11:16:26 +0000 (13:16 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Jun 2025 10:43:26 +0000 (12:43 +0200)
commitf9a1a9448f5c12a24c3724a4899e34a22b90e7f1
tree1a2e4e2ba1d165c6bc062284bba845f574c461b9
parent55131d685ebee43d7f7260f34459201734ee6a44
mmc: rtsx_usb_sdmmc: Re-work the code in sd_set_power_mode()

It's only at MMC_POWER_OFF and at MMC_POWER_UP when some operations must be
carried out in sd_set_power_mode(). The code is a bit obfuscated in this
regards. Let's convert it into a switch-case-clause to make this clear.

Reviewed-by: Avri Altman <avri.altman@sandisk.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Ricky Wu <ricky_wu@realtek.com>
Link: https://lore.kernel.org/r/20250610111633.504366-5-ulf.hansson@linaro.org
drivers/mmc/host/rtsx_usb_sdmmc.c