Re: [PATCH 17/21] mmc: omap: Don't use mmc_card_present() when validating for inserted card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Ulf Hansson <ulf.hansson@xxxxxxxxxx> [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@xxxxxxxxxxxxxxx
> Cc: Tony Lindgren <tony@xxxxxxxxxxx>
> Cc: Jarkko Nikula <jarkko.nikula@xxxxxxxxxx>
> Signed-off-by: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux