From patchwork Tue May 26 15:43:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 11570747 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 97339739 for ; Tue, 26 May 2020 15:43:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7EFF820787 for ; Tue, 26 May 2020 15:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590507830; bh=v7086Qob1vHtxAE6q+xPniojkj/1ehVXZQDXcryapyY=; h=From:To:Cc:Subject:Date:List-ID:From; b=lwdlFvEqEh3l+cKeSPyorT+9UDDPbiRBWd5e4ybVqnGGcLfMZ49PDZeIcGmUzOEPW lhYuvzQZkcv1VynRYDomUFkQ5J4FJCxR10ZD5/xiovkIwRiuSKE4pwimpFQqY6Zhy6 ra3Zzw0gIPshTjxODk6zECJFIrx38A2iJMN77kaI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729869AbgEZPnr (ORCPT ); Tue, 26 May 2020 11:43:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:40184 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727898AbgEZPnq (ORCPT ); Tue, 26 May 2020 11:43:46 -0400 Received: from pali.im (pali.im [31.31.79.79]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D24120663; Tue, 26 May 2020 15:43:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590507826; bh=v7086Qob1vHtxAE6q+xPniojkj/1ehVXZQDXcryapyY=; h=From:To:Cc:Subject:Date:From; b=rjSWVA15R2H6PzCbBynUpEF0IcpTpY9OpXyvCjdW7ifsQJu8hgxCxvvpOPgVm5j/B LXbmaq4ugxfz6K4TZiPvT37bFhAPgwJ98iXmWsvSlX/PUkI6BvT0PmNjThWt4cHIOH LPA6qYAIoEYXkMKmFs7cdJwXCcD7zSEkQhiQWMkw= Received: by pali.im (Postfix) id CDB2216FA; Tue, 26 May 2020 17:43:43 +0200 (CEST) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Ulf Hansson Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Marek?= =?utf-8?q?_Beh=C3=BAn?= Subject: [PATCH 1/2] mmc: core: Do not export MMC_NAME= and MODALIAS=mmc:block for SDIO cards Date: Tue, 26 May 2020 17:43:33 +0200 Message-Id: <20200526154334.21222-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org 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 Reviewed-by: Marek Behún --- drivers/mmc/core/bus.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 74de3f2dd..103eea7cd 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -93,15 +93,20 @@ mmc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) return retval; } - retval = add_uevent_var(env, "MMC_NAME=%s", mmc_card_name(card)); - if (retval) - return retval; - - /* - * Request the mmc_block device. Note: that this is a direct request - * for the module it carries no information as to what is inserted. - */ - retval = add_uevent_var(env, "MODALIAS=mmc:block"); + if (card->type != MMC_TYPE_SDIO) { + retval = add_uevent_var(env, "MMC_NAME=%s", mmc_card_name(card)); + if (retval) + return retval; + + /* + * Request the mmc_block device. + * Note: that this is a direct request for the module it carries + * no information as to what is inserted. + */ + retval = add_uevent_var(env, "MODALIAS=mmc:block"); + if (retval) + return retval; + } return retval; }