From 9958d85968ed2df4b704105fd2a9c3669eb9cd97 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Fri, 6 Oct 2023 15:09:14 -0500 Subject: ASoC: Use device_get_match_data() Use preferred device_get_match_data() instead of of_match_device() to get the driver match data. With this, adjust the includes to explicitly include the correct headers. Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-5-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown --- sound/soc/tegra/tegra210_amx.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'sound/soc/tegra') diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c index 179876949b30..dd1a2c77c6ea 100644 --- a/sound/soc/tegra/tegra210_amx.c +++ b/sound/soc/tegra/tegra210_amx.c @@ -7,9 +7,8 @@ #include #include #include +#include #include -#include -#include #include #include #include @@ -536,18 +535,13 @@ static int tegra210_amx_platform_probe(struct platform_device *pdev) struct tegra210_amx *amx; void __iomem *regs; int err; - const struct of_device_id *match; struct tegra210_amx_soc_data *soc_data; - match = of_match_device(tegra210_amx_of_match, dev); - - soc_data = (struct tegra210_amx_soc_data *)match->data; - amx = devm_kzalloc(dev, sizeof(*amx), GFP_KERNEL); if (!amx) return -ENOMEM; - amx->soc_data = soc_data; + amx->soc_data = device_get_match_data(dev); dev_set_drvdata(dev, amx); -- cgit v1.2.3