diff options
author | Bean Huo <beanhuo@micron.com> | 2022-02-02 19:06:47 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2022-02-28 13:06:22 +0100 |
commit | 685e013bef794561cc9c4bed6fefd4d6f2f67d39 (patch) | |
tree | dfcd00848e937e9a25c54d65ec67641691c0caf9 /drivers/mmc/host | |
parent | dfbaaec99351fd840ea2572a1adb0294a098f0bb (diff) |
mmc: sdhci-of-at91: Use of_device_get_match_data() helper
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 <beanhuo@micron.com>
Link: https://lore.kernel.org/r/20220202180648.1252154-5-huobean@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/sdhci-of-at91.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c index d1a1c548c515..10fb4cb2c731 100644 --- a/drivers/mmc/host/sdhci-of-at91.c +++ b/drivers/mmc/host/sdhci-of-at91.c @@ -308,17 +308,15 @@ static const struct dev_pm_ops sdhci_at91_dev_pm_ops = { static int sdhci_at91_probe(struct platform_device *pdev) { - const struct of_device_id *match; const struct sdhci_at91_soc_data *soc_data; struct sdhci_host *host; struct sdhci_pltfm_host *pltfm_host; struct sdhci_at91_priv *priv; int ret; - match = of_match_device(sdhci_at91_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(*priv)); if (IS_ERR(host)) |