lkml.org 
[lkml]   [2020]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block for SDIO cards
On Wed, 27 May 2020 at 13:09, Pali Rohár <pali@kernel.org> wrote:
>
> SDIO non-combo cards are not handled by mmc_block driver and do not have
> accessible CID register which is used for MMC_NAME= construction.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Reviewed-by: Marek Behún <marek.behun@nic.cz>

Applied for next, thanks!

Kind regards
Uffe


>
> ---
> Changes in V2:
> * Use early returns pattern
> ---
> drivers/mmc/core/bus.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index 74de3f2dd..b1cb447da 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -93,6 +93,13 @@ mmc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
> return retval;
> }
>
> + /*
> + * SDIO (non-combo) cards are not handled by mmc_block driver and do not
> + * have accessible CID register which used by mmc_card_name() function.
> + */
> + if (card->type == MMC_TYPE_SDIO)
> + return 0;
> +
> retval = add_uevent_var(env, "MMC_NAME=%s", mmc_card_name(card));
> if (retval)
> return retval;
> --
> 2.20.1
>

\
 
 \ /
  Last update: 2020-05-28 12:16    [W:0.054 / U:2.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site