summaryrefslogtreecommitdiff
path: root/sound/soc/tegra
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-10-06 15:09:14 -0500
committerMark Brown <broonie@kernel.org>2023-10-09 13:13:59 +0100
commit9958d85968ed2df4b704105fd2a9c3669eb9cd97 (patch)
tree6b7e35136e317d6546930b369159e1dca2468ad6 /sound/soc/tegra
parentec5236c2e6ec1ce62237a2e9345dd2ffc4fc6d56 (diff)
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 <robh@kernel.org> Link: https://lore.kernel.org/r/20231006-dt-asoc-header-cleanups-v3-5-13a4f0f7fee6@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/tegra')
-rw-r--r--sound/soc/tegra/tegra210_amx.c10
1 files changed, 2 insertions, 8 deletions
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 <linux/clk.h>
#include <linux/device.h>
#include <linux/io.h>
+#include <linux/mod_devicetable.h>
#include <linux/module.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regmap.h>
@@ -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);