]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mmc: omap: Don't use mmc_card_present() when validating for inserted card
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 13 Jan 2017 13:14:12 +0000 (14:14 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 13 Feb 2017 12:20:23 +0000 (13:20 +0100)
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>
drivers/mmc/host/omap.c

index be3c49fa7382f31bde9b671834e74dc9f41c9874..bd49f34d765460283e13649a6030fa358e1eaaaf 100644 (file)
@@ -893,7 +893,7 @@ static void mmc_omap_cover_handler(unsigned long param)
         * If no card is inserted, we postpone polling until
         * the cover has been closed.
         */
-       if (slot->mmc->card == NULL || !mmc_card_present(slot->mmc->card))
+       if (slot->mmc->card == NULL)
                return;
 
        mod_timer(&slot->cover_timer,