diff options
author | Bean Huo <beanhuo@micron.com> | 2022-02-02 19:06:45 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2022-02-28 13:06:22 +0100 |
commit | dfbaaec99351fd840ea2572a1adb0294a098f0bb (patch) | |
tree | 05e6f07965d6d094b8b59697ed5ff251d26e737c /drivers/mmc | |
parent | mmc: wmt-sdmmc: Use of_device_get_match_data() helper (diff) | |
download | linux-dfbaaec99351fd840ea2572a1adb0294a098f0bb.tar.xz linux-dfbaaec99351fd840ea2572a1adb0294a098f0bb.zip |
mmc: sdhci-tegra: Use of_device_get_match_data() helper
Only the device data is needed,not the whole struct of_device_id.
Use of_device_get_match_data() instead of open coding of of_match_device().
Signed-off-by: Bean Huo <beanhuo@micron.com>
Link: https://lore.kernel.org/r/20220202180648.1252154-3-huobean@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-tegra.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci-tegra.c b/drivers/mmc/host/sdhci-tegra.c index 5c84bd5764ee..2d2d8260c681 100644 --- a/drivers/mmc/host/sdhci-tegra.c +++ b/drivers/mmc/host/sdhci-tegra.c @@ -1618,7 +1618,6 @@ cleanup: static int sdhci_tegra_probe(struct platform_device *pdev) { - const struct of_device_id *match; const struct sdhci_tegra_soc_data *soc_data; struct sdhci_host *host; struct sdhci_pltfm_host *pltfm_host; @@ -1626,10 +1625,9 @@ static int sdhci_tegra_probe(struct platform_device *pdev) struct clk *clk; int rc; - match = of_match_device(sdhci_tegra_dt_match, &pdev->dev); - if (!match) + soc_data = of_device_get_match_data(&pdev->dev); + if (!soc_data) return -EINVAL; - soc_data = match->data; host = sdhci_pltfm_init(pdev, soc_data->pdata, sizeof(*tegra_host)); if (IS_ERR(host)) |