summaryrefslogtreecommitdiff
path: root/sound/soc/stm/stm32_spdifrx.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/stm/stm32_spdifrx.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/stm/stm32_spdifrx.c')
-rw-r--r--sound/soc/stm/stm32_spdifrx.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c
index a359b528b26b..9eed3c57e3f1 100644
--- a/sound/soc/stm/stm32_spdifrx.c
+++ b/sound/soc/stm/stm32_spdifrx.c
@@ -908,17 +908,13 @@ static int stm32_spdifrx_parse_of(struct platform_device *pdev,
struct stm32_spdifrx_data *spdifrx)
{
struct device_node *np = pdev->dev.of_node;
- const struct of_device_id *of_id;
struct resource *res;
if (!np)
return -ENODEV;
- of_id = of_match_device(stm32_spdifrx_ids, &pdev->dev);
- if (of_id)
- spdifrx->regmap_conf =
- (const struct regmap_config *)of_id->data;
- else
+ spdifrx->regmap_conf = device_get_match_data(&pdev->dev);
+ if (!spdifrx->regmap_conf)
return -EINVAL;
spdifrx->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);