2022-02-03 12:07:10

by Bean Huo

[permalink] [raw]
Subject: [PATCH 0/5] Use of_device_get_match_data() helper

From: Bean Huo <[email protected]>

*** BLURB HERE ***

Bean Huo (5):
mmc: wmt-sdmmc: Use of_device_get_match_data() helper
mmc: sdhci-tegra: Use of_device_get_match_data() helper
mmc: sdhci-omap: Use of_device_get_match_data() helper
mmc: sdhci-of-at91: Use of_device_get_match_data() helper
mmc: davinci: Use of_device_get_match_data() helper

drivers/mmc/host/davinci_mmc.c | 6 ++----
drivers/mmc/host/sdhci-of-at91.c | 6 ++----
drivers/mmc/host/sdhci-omap.c | 7 +------
drivers/mmc/host/sdhci-tegra.c | 6 ++----
drivers/mmc/host/wmt-sdmmc.c | 7 ++-----
5 files changed, 9 insertions(+), 23 deletions(-)

--
2.25.1


2022-02-05 14:53:49

by Bean Huo

[permalink] [raw]
Subject: [PATCH 3/5] mmc: sdhci-omap: Use of_device_get_match_data() helper

From: Bean Huo <[email protected]>

Only the device data is needed, not the entire struct of_device_id.
Use of_device_get_match_data() instead of open coding of_match_device().

Signed-off-by: Bean Huo <[email protected]>
---
drivers/mmc/host/sdhci-omap.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c
index 64e27c2821f9..676e3cbbfc95 100644
--- a/drivers/mmc/host/sdhci-omap.c
+++ b/drivers/mmc/host/sdhci-omap.c
@@ -1219,16 +1219,11 @@ static int sdhci_omap_probe(struct platform_device *pdev)
struct sdhci_pltfm_host *pltfm_host;
struct sdhci_omap_host *omap_host;
struct mmc_host *mmc;
- const struct of_device_id *match;
struct sdhci_omap_data *data;
const struct soc_device_attribute *soc;
struct resource *regs;

- match = of_match_device(omap_sdhci_match, dev);
- if (!match)
- return -EINVAL;
-
- data = (struct sdhci_omap_data *)match->data;
+ data = of_device_get_match_data(&pdev->dev);
if (!data) {
dev_err(dev, "no sdhci omap data\n");
return -EINVAL;
--
2.25.1


2022-02-09 06:28:52

by Bean Huo

[permalink] [raw]
Subject: Re: [PATCH 0/5] Use of_device_get_match_data() helper

On Tue, 2022-02-08 at 16:12 +0100, Ulf Hansson wrote:
> On Wed, 2 Feb 2022 at 19:07, Bean Huo <[email protected]> wrote:
> > From: Bean Huo <[email protected]>
> >
> > *** BLURB HERE ***
> >
> > Bean Huo (5):
> > mmc: wmt-sdmmc: Use of_device_get_match_data() helper
> > mmc: sdhci-tegra: Use of_device_get_match_data() helper
> > mmc: sdhci-omap: Use of_device_get_match_data() helper
> > mmc: sdhci-of-at91: Use of_device_get_match_data() helper
> > mmc: davinci: Use of_device_get_match_data() helper
> >
> > drivers/mmc/host/davinci_mmc.c | 6 ++----
> > drivers/mmc/host/sdhci-of-at91.c | 6 ++----
> > drivers/mmc/host/sdhci-omap.c | 7 +------
> > drivers/mmc/host/sdhci-tegra.c | 6 ++----
> > drivers/mmc/host/wmt-sdmmc.c | 7 ++-----
> > 5 files changed, 9 insertions(+), 23 deletions(-)
> >
>
> Series applied for next, except patch3 that seems to need some minor
> adjustments, thanks!
>

Thanks, I will update the patch3.

Kind regards,
Bean

> Kind regards
> Uffe


2022-02-09 11:32:30

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 0/5] Use of_device_get_match_data() helper

On Wed, 2 Feb 2022 at 19:07, Bean Huo <[email protected]> wrote:
>
> From: Bean Huo <[email protected]>
>
> *** BLURB HERE ***
>
> Bean Huo (5):
> mmc: wmt-sdmmc: Use of_device_get_match_data() helper
> mmc: sdhci-tegra: Use of_device_get_match_data() helper
> mmc: sdhci-omap: Use of_device_get_match_data() helper
> mmc: sdhci-of-at91: Use of_device_get_match_data() helper
> mmc: davinci: Use of_device_get_match_data() helper
>
> drivers/mmc/host/davinci_mmc.c | 6 ++----
> drivers/mmc/host/sdhci-of-at91.c | 6 ++----
> drivers/mmc/host/sdhci-omap.c | 7 +------
> drivers/mmc/host/sdhci-tegra.c | 6 ++----
> drivers/mmc/host/wmt-sdmmc.c | 7 ++-----
> 5 files changed, 9 insertions(+), 23 deletions(-)
>

Series applied for next, except patch3 that seems to need some minor
adjustments, thanks!

Kind regards
Uffe