summaryrefslogtreecommitdiff
path: root/sound/soc/stm/stm32_i2s.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2023-10-09 20:49:16 +0100
committerMark Brown <broonie@kernel.org>2023-10-09 23:14:18 +0100
commita7ec043e601d1dca69ac827f51dbe1dbaa1e89aa (patch)
treefea389769379eb60420f9bce7639ef0e431d67e9 /sound/soc/stm/stm32_i2s.c
parentf0d82f073d79cecbbaffff425c41db4c16b395f6 (diff)
parent9958d85968ed2df4b704105fd2a9c3669eb9cd97 (diff)
ASoC: DT matching and header cleanups
Merge series from Rob Herring <robh@kernel.org>: This is a series is part of ongoing clean-ups related to device matching and DT related implicit includes. Essentially of_device.h has a bunch of implicit includes and generally isn't needed any nore except for of_match_device(). As we also generally want to get rid of of_match_device() as well, I've done that so we're not updating the includes twice.
Diffstat (limited to 'sound/soc/stm/stm32_i2s.c')
-rw-r--r--sound/soc/stm/stm32_i2s.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/stm/stm32_i2s.c b/sound/soc/stm/stm32_i2s.c
index 06a42130f5e4..46098e111142 100644
--- a/sound/soc/stm/stm32_i2s.c
+++ b/sound/soc/stm/stm32_i2s.c
@@ -1024,7 +1024,6 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
struct stm32_i2s_data *i2s)
{
struct device_node *np = pdev->dev.of_node;
- const struct of_device_id *of_id;
struct reset_control *rst;
struct resource *res;
int irq, ret;
@@ -1032,10 +1031,8 @@ static int stm32_i2s_parse_dt(struct platform_device *pdev,
if (!np)
return -ENODEV;
- of_id = of_match_device(stm32_i2s_ids, &pdev->dev);
- if (of_id)
- i2s->regmap_conf = (const struct regmap_config *)of_id->data;
- else
+ i2s->regmap_conf = device_get_match_data(&pdev->dev);
+ if (!i2s->regmap_conf)
return -EINVAL;
i2s->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);