From: Adrian Hunter <adrian.hunter@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/2] mmc: sdhci-pltfm: Make driver OF independent
Date: Mon, 9 Oct 2023 19:58:50 +0300 [thread overview]
Message-ID: <eeb70bd9-e347-4d19-a597-bd7857b96306@intel.com> (raw)
In-Reply-To: <20231006105803.3374241-2-andriy.shevchenko@linux.intel.com>
On 6/10/23 13:58, Andy Shevchenko wrote:
> Since we have device_is_compatible() API, drop OF dependency
> in the driver.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-pltfm.c | 16 ++++++----------
> 1 file changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c
> index 4d1a703a5bdb..62753d72198a 100644
> --- a/drivers/mmc/host/sdhci-pltfm.c
> +++ b/drivers/mmc/host/sdhci-pltfm.c
> @@ -19,7 +19,6 @@
> #include <linux/err.h>
> #include <linux/module.h>
> #include <linux/property.h>
> -#include <linux/of.h>
> #ifdef CONFIG_PPC
> #include <asm/machdep.h>
> #endif
> @@ -56,19 +55,16 @@ static bool sdhci_wp_inverted(struct device *dev)
>
> static void sdhci_get_compatibility(struct platform_device *pdev)
> {
> + struct device *dev = &pdev->dev;
> struct sdhci_host *host = platform_get_drvdata(pdev);
> - struct device_node *np = pdev->dev.of_node;
>
> - if (!np)
> - return;
> -
> - if (of_device_is_compatible(np, "fsl,p2020-rev1-esdhc"))
> + if (device_is_compatible(dev, "fsl,p2020-rev1-esdhc"))
> host->quirks |= SDHCI_QUIRK_BROKEN_DMA;
>
> - if (of_device_is_compatible(np, "fsl,p2020-esdhc") ||
> - of_device_is_compatible(np, "fsl,p1010-esdhc") ||
> - of_device_is_compatible(np, "fsl,t4240-esdhc") ||
> - of_device_is_compatible(np, "fsl,mpc8536-esdhc"))
> + if (device_is_compatible(dev, "fsl,p2020-esdhc") ||
> + device_is_compatible(dev, "fsl,p1010-esdhc") ||
> + device_is_compatible(dev, "fsl,t4240-esdhc") ||
> + device_is_compatible(dev, "fsl,mpc8536-esdhc"))
> host->quirks |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
> }
>
next prev parent reply other threads:[~2023-10-09 16:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 10:58 [PATCH v1 1/2] mmc: sdhci-pltfm: Drop unnecessary error messages in sdhci_pltfm_init() Andy Shevchenko
2023-10-06 10:58 ` [PATCH v1 2/2] mmc: sdhci-pltfm: Make driver OF independent Andy Shevchenko
2023-10-09 16:58 ` Adrian Hunter [this message]
2023-10-10 14:27 ` Ulf Hansson
2023-10-09 16:35 ` [PATCH v1 1/2] mmc: sdhci-pltfm: Drop unnecessary error messages in sdhci_pltfm_init() Adrian Hunter
2023-10-10 14:27 ` 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=eeb70bd9-e347-4d19-a597-bd7857b96306@intel.com \
--to=adrian.hunter@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--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