Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: omap: Don't use mmc_card_present() when validating for inserted card

The mmc_card_present() function helps the mmc core to track an internal
state of the card device. More importantly, it's not intended to be used by
mmc host drivers to check for an inserted card. Therefore, let's stop using
it and instead rely on checking for a valid pointer to a struct mmc_card,
as it should be good enough.

Cc: linux-omap@vger.kernel.org
Cc: Tony Lindgren <tony@atomide.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

+1 -1
+1 -1
drivers/mmc/host/omap.c
··· 893 893 * If no card is inserted, we postpone polling until 894 894 * the cover has been closed. 895 895 */ 896 - if (slot->mmc->card == NULL || !mmc_card_present(slot->mmc->card)) 896 + if (slot->mmc->card == NULL) 897 897 return; 898 898 899 899 mod_timer(&slot->cover_timer,