* [PATCH] drivers/mmc/core/bus: Remove redundant driver match function
@ 2021-12-07 9:50 lizhe
2021-12-07 13:05 ` Uwe Kleine-König
2021-12-09 10:05 ` Ulf Hansson
0 siblings, 2 replies; 5+ messages in thread
From: lizhe @ 2021-12-07 9:50 UTC (permalink / raw)
To: ulf.hansson, u.kleine-koenig, srinivas.pandruvada, pali,
TheSven73, lznuaa, sensor1010
Cc: linux-mmc, linux-kernel
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/mmc/core/bus: Remove redundant driver match function
2021-12-07 9:50 [PATCH] drivers/mmc/core/bus: Remove redundant driver match function lizhe
@ 2021-12-07 13:05 ` Uwe Kleine-König
2021-12-09 10:05 ` Ulf Hansson
1 sibling, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2021-12-07 13:05 UTC (permalink / raw)
To: lizhe
Cc: ulf.hansson, srinivas.pandruvada, pali, TheSven73, lznuaa,
linux-mmc, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
On Tue, Dec 07, 2021 at 01:50:29AM -0800, lizhe wrote:
> 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>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
If you want to make it easier for maintainers to take your patches,
consider using -v2 for git send-email (or git format-patch) the next
time.
Best regards and thanks
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/mmc/core/bus: Remove redundant driver match function
2021-12-07 9:50 [PATCH] drivers/mmc/core/bus: Remove redundant driver match function lizhe
2021-12-07 13:05 ` Uwe Kleine-König
@ 2021-12-09 10:05 ` Ulf Hansson
1 sibling, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2021-12-09 10:05 UTC (permalink / raw)
To: lizhe
Cc: u.kleine-koenig, srinivas.pandruvada, pali, TheSven73, lznuaa,
linux-mmc, linux-kernel
On Tue, 7 Dec 2021 at 10:51, lizhe <sensor1010@163.com> wrote:
>
> 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>
Applied for next, thanks!
Kind regards
Uffe
> ---
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drivers/mmc/core/bus: Remove redundant driver match function
2021-12-09 12:01 lizhe
@ 2021-12-09 12:56 ` Ulf Hansson
0 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2021-12-09 12:56 UTC (permalink / raw)
To: lizhe
Cc: u.kleine-koenig, srinivas.pandruvada, pali, TheSven73, lznuaa,
linux-mmc, linux-kernel
On Thu, 9 Dec 2021 at 13:02, lizhe <sensor1010@163.com> wrote:
>
> 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>
I have already applied your previous version. Or is there a change in
this version?
Future wise, please bump the version number between each submission
and highlight what you have changed. See
Documentation/SubmittingPatches.
Kind regards
Uffe
> ---
> 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
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] drivers/mmc/core/bus: Remove redundant driver match function
@ 2021-12-09 12:01 lizhe
2021-12-09 12:56 ` Ulf Hansson
0 siblings, 1 reply; 5+ messages in thread
From: lizhe @ 2021-12-09 12:01 UTC (permalink / raw)
To: ulf.hansson, u.kleine-koenig, srinivas.pandruvada, pali,
TheSven73, lznuaa, sensor1010
Cc: linux-mmc, linux-kernel
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-09 12:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-07 9:50 [PATCH] drivers/mmc/core/bus: Remove redundant driver match function lizhe
2021-12-07 13:05 ` Uwe Kleine-König
2021-12-09 10:05 ` Ulf Hansson
2021-12-09 12:01 lizhe
2021-12-09 12:56 ` Ulf Hansson
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.