summaryrefslogtreecommitdiff
path: root/sound/soc/stm/stm32_sai_sub.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-10-06 23:09:14 +0300
committerMark Brown <broonie@kernel.org>2023-10-09 15:13:59 +0300
commit9958d85968ed2df4b704105fd2a9c3669eb9cd97 (patch)
tree6b7e35136e317d6546930b369159e1dca2468ad6 /sound/soc/stm/stm32_sai_sub.c
parentec5236c2e6ec1ce62237a2e9345dd2ffc4fc6d56 (diff)
downloadlinux-9958d85968ed2df4b704105fd2a9c3669eb9cd97.tar.xz
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/stm/stm32_sai_sub.c')
-rw-r--r--sound/soc/stm/stm32_sai_sub.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index 8bcb98d9b64e..ad2492efb1cd 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -1506,7 +1506,6 @@ static int stm32_sai_sub_parse_of(struct platform_device *pdev,
static int stm32_sai_sub_probe(struct platform_device *pdev)
{
struct stm32_sai_sub_data *sai;
- const struct of_device_id *of_id;
const struct snd_dmaengine_pcm_config *conf = &stm32_sai_pcm_config;
int ret;
@@ -1514,10 +1513,7 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
if (!sai)
return -ENOMEM;
- of_id = of_match_device(stm32_sai_sub_ids, &pdev->dev);
- if (!of_id)
- return -EINVAL;
- sai->id = (uintptr_t)of_id->data;
+ sai->id = (uintptr_t)device_get_match_data(&pdev->dev);
sai->pdev = pdev;
mutex_init(&sai->ctrl_lock);