* [PATCH 17/21] mmc: omap: Don't use mmc_card_present() when validating for inserted card
[not found] <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org>
@ 2016-12-30 12:47 ` Ulf Hansson
2017-01-02 17:11 ` Tony Lindgren
2017-01-09 18:24 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Ulf Hansson @ 2016-12-30 12:47 UTC (permalink / raw)
To: linux-mmc, Ulf Hansson
Cc: Jaehoon Chung, Adrian Hunter, Linus Walleij, linux-omap,
Tony Lindgren, Jarkko Nikula
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>
---
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,
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 17/21] mmc: omap: Don't use mmc_card_present() when validating for inserted card
2016-12-30 12:47 ` [PATCH 17/21] mmc: omap: Don't use mmc_card_present() when validating for inserted card Ulf Hansson
@ 2017-01-02 17:11 ` Tony Lindgren
2017-01-09 18:24 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2017-01-02 17:11 UTC (permalink / raw)
To: Ulf Hansson
Cc: linux-mmc, Jaehoon Chung, Adrian Hunter, Linus Walleij,
linux-omap, Jarkko Nikula
* Ulf Hansson <ulf.hansson@linaro.org> [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 <tony@atomide.com>
> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
> 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 <tony@atomide.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 17/21] mmc: omap: Don't use mmc_card_present() when validating for inserted card
2016-12-30 12:47 ` [PATCH 17/21] mmc: omap: Don't use mmc_card_present() when validating for inserted card Ulf Hansson
2017-01-02 17:11 ` Tony Lindgren
@ 2017-01-09 18:24 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2017-01-09 18:24 UTC (permalink / raw)
To: Ulf Hansson
Cc: linux-mmc@vger.kernel.org, Jaehoon Chung, Adrian Hunter,
Linux-OMAP, Tony Lindgren, Jarkko Nikula
On Fri, Dec 30, 2016 at 1:47 PM, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> 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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-09 18:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org>
2016-12-30 12:47 ` [PATCH 17/21] mmc: omap: Don't use mmc_card_present() when validating for inserted card Ulf Hansson
2017-01-02 17:11 ` Tony Lindgren
2017-01-09 18:24 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).