From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tony Lindgren Subject: Re: [PATCH 17/21] mmc: omap: Don't use mmc_card_present() when validating for inserted card Date: Mon, 2 Jan 2017 09:11:40 -0800 Message-ID: <20170102171140.GD9325@atomide.com> References: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> <1483102054-1752-18-git-send-email-ulf.hansson@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1483102054-1752-18-git-send-email-ulf.hansson@linaro.org> Sender: linux-mmc-owner@vger.kernel.org To: Ulf Hansson Cc: linux-mmc@vger.kernel.org, Jaehoon Chung , Adrian Hunter , Linus Walleij , linux-omap@vger.kernel.org, Jarkko Nikula List-Id: linux-omap@vger.kernel.org * Ulf Hansson [161230 04:49]: > 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 > Cc: Jarkko Nikula > Signed-off-by: Ulf Hansson > --- > drivers/mmc/host/omap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c > index be3c49f..bd49f34 100644 > --- a/drivers/mmc/host/omap.c > +++ b/drivers/mmc/host/omap.c > @@ -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, Makes sense to me: Acked-by: Tony Lindgren