diff options
author | Chanwoo Lee <cw9316.lee@samsung.com> | 2024-08-29 11:47:09 +0900 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2024-09-03 14:14:51 +0200 |
commit | 4c0a6a0ac902dbf184ae7be1f1fce225cc0b7380 (patch) | |
tree | 380cf06295763be2c3100953391492d8390edf41 /drivers/mmc/core/sd_ops.c | |
parent | 73abb1f16e28d5a41d0abea779a3f0b75cf8823e (diff) | |
download | linux-4c0a6a0ac902dbf184ae7be1f1fce225cc0b7380.tar.gz linux-4c0a6a0ac902dbf184ae7be1f1fce225cc0b7380.tar.bz2 linux-4c0a6a0ac902dbf184ae7be1f1fce225cc0b7380.zip |
mmc: core: Replace the argument of mmc_sd_switch() with defines
Replace with already defined values for readability. While at it, let's
also change the mode-parameter from an int to bool, as the only used values
are 0 or 1.
Signed-off-by: Chanwoo Lee <cw9316.lee@samsung.com>
Link: https://lore.kernel.org/r/20240829024709.402285-1-cw9316.lee@samsung.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/sd_ops.c')
-rw-r--r-- | drivers/mmc/core/sd_ops.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/core/sd_ops.c b/drivers/mmc/core/sd_ops.c index 8b9b34286ef3..f93c392040ae 100644 --- a/drivers/mmc/core/sd_ops.c +++ b/drivers/mmc/core/sd_ops.c @@ -336,14 +336,13 @@ int mmc_app_send_scr(struct mmc_card *card) return 0; } -int mmc_sd_switch(struct mmc_card *card, int mode, int group, +int mmc_sd_switch(struct mmc_card *card, bool mode, int group, u8 value, u8 *resp) { u32 cmd_args; /* NOTE: caller guarantees resp is heap-allocated */ - mode = !!mode; value &= 0xF; cmd_args = mode << 31 | 0x00FFFFFF; cmd_args &= ~(0xF << (group * 4)); |