summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2020-05-27 13:08:57 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2020-05-29 12:38:00 +0200
commitc03ac5e6fad13c3ef9ce505191ae7419fda2fa4f (patch)
tree3bffaf8ef609fdadb43e5a2c14d9ef8c9c4edd0c /drivers/mmc
parentmmc: sdhci-of-at91: fix CALCR register being rewritten (diff)
downloadlinux-c03ac5e6fad13c3ef9ce505191ae7419fda2fa4f.tar.xz
linux-c03ac5e6fad13c3ef9ce505191ae7419fda2fa4f.zip
mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block for SDIO cards
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> Link: https://lore.kernel.org/r/20200527110858.17504-1-pali@kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/bus.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index 74de3f2dda38..b1cb447da764 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;