All of lore.kernel.org
 help / color / mirror / Atom feed
From: lizhe <sensor1010@163.com>
To: ulf.hansson@linaro.org, u.kleine-koenig@pengutronix.de,
	srinivas.pandruvada@linux.intel.com, pali@kernel.org,
	TheSven73@gmail.com, lznuaa@gmail.com, sensor1010@163.com
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] drivers/mmc/core/bus: Remove redundant driver match function
Date: Tue,  7 Dec 2021 01:50:29 -0800	[thread overview]
Message-ID: <20211207095029.96387-1-sensor1010@163.com> (raw)

If there is no driver match function, the driver core assumes
that each candidate pair (driver, device) matches. See function
driver_match_device().

Drop the mmc bus's match function that always returned 1 and
so implements the same behaviour as when there is no match
function.

Signed-off-by: lizhe <sensor1010@163.com>
---
 drivers/mmc/core/bus.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index f6b7a9c5bbff..096ae624be9a 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -53,16 +53,6 @@ static struct attribute *mmc_dev_attrs[] = {
 };
 ATTRIBUTE_GROUPS(mmc_dev);
 
-/*
- * This currently matches any MMC driver to any MMC card - drivers
- * themselves make the decision whether to drive this card in their
- * probe method.
- */
-static int mmc_bus_match(struct device *dev, struct device_driver *drv)
-{
-	return 1;
-}
-
 static int
 mmc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
@@ -226,7 +216,6 @@ static const struct dev_pm_ops mmc_bus_pm_ops = {
 static struct bus_type mmc_bus_type = {
 	.name		= "mmc",
 	.dev_groups	= mmc_dev_groups,
-	.match		= mmc_bus_match,
 	.uevent		= mmc_bus_uevent,
 	.probe		= mmc_bus_probe,
 	.remove		= mmc_bus_remove,
-- 
2.25.1



             reply	other threads:[~2021-12-07  9:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07  9:50 lizhe [this message]
2021-12-07 13:05 ` [PATCH] drivers/mmc/core/bus: Remove redundant driver match function Uwe Kleine-König
2021-12-09 10:05 ` Ulf Hansson
2021-12-09 12:01 lizhe
2021-12-09 12:56 ` 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=20211207095029.96387-1-sensor1010@163.com \
    --to=sensor1010@163.com \
    --cc=TheSven73@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=lznuaa@gmail.com \
    --cc=pali@kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=u.kleine-koenig@pengutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.