diff options
author | Seunghui Lee <sh043.lee@samsung.com> | 2022-07-13 12:36:34 +0900 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2022-07-13 12:44:41 +0200 |
commit | 3beb0ab5bffba625007ea5c9e5e0ee5eef05c1ea (patch) | |
tree | db059021eb00edacef6acb8dd546749439f7d7a5 /drivers/mmc/core/block.c | |
parent | 54c16b522e00583ba1151501286b0cf4c91e08c3 (diff) | |
download | lwn-3beb0ab5bffba625007ea5c9e5e0ee5eef05c1ea.tar.gz lwn-3beb0ab5bffba625007ea5c9e5e0ee5eef05c1ea.zip |
mmc: core: Use mmc_card_* macro and add a new for the sd_combo type
Add mmc_card_sd_combo() macro for sd combo type card and use the mmc_card_*
macro to simplify code instead of comparing card->type.
Signed-off-by: Seunghui Lee <sh043.lee@samsung.com>
Link: https://lore.kernel.org/r/20220713033635.28432-2-sh043.lee@samsung.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/block.c')
-rw-r--r-- | drivers/mmc/core/block.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index f4a1281658db..9c642b3b7c20 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2988,7 +2988,7 @@ static int mmc_blk_probe(struct mmc_card *card) * Don't enable runtime PM for SD-combo cards here. Leave that * decision to be taken during the SDIO init sequence instead. */ - if (card->type != MMC_TYPE_SD_COMBO) { + if (!mmc_card_sd_combo(card)) { pm_runtime_set_active(&card->dev); pm_runtime_enable(&card->dev); } @@ -3015,7 +3015,7 @@ static void mmc_blk_remove(struct mmc_card *card) mmc_blk_part_switch(card, md->part_type); mmc_release_host(card->host); } - if (card->type != MMC_TYPE_SD_COMBO) + if (!mmc_card_sd_combo(card)) pm_runtime_disable(&card->dev); pm_runtime_put_noidle(&card->dev); mmc_blk_remove_req(md); |