diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-10-06 12:58:03 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2023-10-10 15:46:39 +0200 |
commit | 4261ff59f4be26fb4a553c6e916852221fae4477 (patch) | |
tree | 17f5564d7ffbf608857aae44d331a52df4bacfc0 /drivers/mmc | |
parent | mmc: sdhci-pltfm: Drop unnecessary error messages in sdhci_pltfm_init() (diff) | |
download | linux-4261ff59f4be26fb4a553c6e916852221fae4477.tar.xz linux-4261ff59f4be26fb4a553c6e916852221fae4477.zip |
mmc: sdhci-pltfm: Make driver OF independent
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>
Link: https://lore.kernel.org/r/20231006105803.3374241-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-pltfm.c | 16 |
1 files 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; } |