]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
mmc: rename mmc_can_sleep() to mmc_card_can_sleep()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 1 Apr 2025 09:58:44 +0000 (11:58 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 14 May 2025 14:59:17 +0000 (16:59 +0200)
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-9-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc.c

index f39d7f9ed7c2438d517a0abd6c29cc029e8144d6..29970f1478f53064bfe953853d3f0e318395d3be 100644 (file)
@@ -1955,7 +1955,7 @@ err:
        return err;
 }
 
-static int mmc_can_sleep(struct mmc_card *card)
+static bool mmc_card_can_sleep(struct mmc_card *card)
 {
        return card->ext_csd.rev >= 3;
 }
@@ -2139,7 +2139,7 @@ static int _mmc_suspend(struct mmc_host *host, enum mmc_poweroff_type pm_type)
        if (mmc_card_can_poweroff_notify(host->card) &&
            mmc_host_can_poweroff_notify(host, pm_type))
                err = mmc_poweroff_notify(host->card, notify_type);
-       else if (mmc_can_sleep(host->card))
+       else if (mmc_card_can_sleep(host->card))
                err = mmc_sleep(host);
        else if (!mmc_host_is_spi(host))
                err = mmc_deselect_cards(host);