summaryrefslogtreecommitdiff
path: root/sound/soc/ti/davinci-evm.c
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/ti/davinci-evm.c
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/ti/davinci-evm.c')
-rw-r--r--sound/soc/ti/davinci-evm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/ti/davinci-evm.c b/sound/soc/ti/davinci-evm.c
index ae7fdd761a7a..1bf333d2740d 100644
--- a/sound/soc/ti/davinci-evm.c
+++ b/sound/soc/ti/davinci-evm.c
@@ -175,20 +175,17 @@ static struct snd_soc_card evm_soc_card = {
static int davinci_evm_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
- const struct of_device_id *match;
struct snd_soc_dai_link *dai;
struct snd_soc_card_drvdata_davinci *drvdata = NULL;
struct clk *mclk;
int ret = 0;
- match = of_match_device(of_match_ptr(davinci_evm_dt_ids), &pdev->dev);
- if (!match) {
+ dai = (struct snd_soc_dai_link *) device_get_match_data(&pdev->dev);
+ if (!dai) {
dev_err(&pdev->dev, "Error: No device match found\n");
return -ENODEV;
}
- dai = (struct snd_soc_dai_link *) match->data;
-
evm_soc_card.dai_link = dai;
dai->codecs->of_node = of_parse_phandle(np, "ti,audio-codec", 0);