From: "Pali Rohár" <pali@kernel.org>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
"Marek Behún" <marek.behun@nic.cz>
Subject: [PATCH v2 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block for SDIO cards
Date: Wed, 27 May 2020 13:08:57 +0200 [thread overview]
Message-ID: <20200527110858.17504-1-pali@kernel.org> (raw)
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>
---
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
next prev reply other threads:[~2020-05-27 11:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 15:43 [PATCH 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block for SDIO cards Pali Rohár
2020-05-26 15:43 ` [PATCH 2/2] mmc: core: Export device/vendor ids from Common CIS " Pali Rohár
2020-05-27 7:39 ` Ulf Hansson
2020-05-27 8:00 ` Pali Rohár
2020-05-27 8:13 ` Ulf Hansson
2020-05-27 11:08 ` Pali Rohár [this message]
2020-05-27 11:08 ` [PATCH v2 " Pali Rohár
2020-05-28 10:14 ` Ulf Hansson
2020-05-28 10:14 ` [PATCH v2 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block " Ulf Hansson
2020-05-27 7:34 ` [PATCH " Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200527110858.17504-1-pali@kernel.org \
--to=pali@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=marek.behun@nic.cz \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).