summaryrefslogtreecommitdiffstats
path: root/sound/soc/rockchip/rockchip_pdm.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/rockchip/rockchip_pdm.c
parentec5236c2e6ec1ce62237a2e9345dd2ffc4fc6d56 (diff)
downloadlinux-stable-9958d85968ed2df4b704105fd2a9c3669eb9cd97.tar.gz
linux-stable-9958d85968ed2df4b704105fd2a9c3669eb9cd97.tar.bz2
linux-stable-9958d85968ed2df4b704105fd2a9c3669eb9cd97.zip
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/rockchip/rockchip_pdm.c')
-rw-r--r--sound/soc/rockchip/rockchip_pdm.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/sound/soc/rockchip/rockchip_pdm.c b/sound/soc/rockchip/rockchip_pdm.c
index 4756cfc23218..d16a4a67a6a2 100644
--- a/sound/soc/rockchip/rockchip_pdm.c
+++ b/sound/soc/rockchip/rockchip_pdm.c
@@ -8,7 +8,6 @@
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/of.h>
-#include <linux/of_device.h>
#include <linux/pm_runtime.h>
#include <linux/rational.h>
#include <linux/regmap.h>
@@ -572,7 +571,6 @@ static int rockchip_pdm_path_parse(struct rk_pdm_dev *pdm, struct device_node *n
static int rockchip_pdm_probe(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
- const struct of_device_id *match;
struct rk_pdm_dev *pdm;
struct resource *res;
void __iomem *regs;
@@ -582,10 +580,7 @@ static int rockchip_pdm_probe(struct platform_device *pdev)
if (!pdm)
return -ENOMEM;
- match = of_match_device(rockchip_pdm_match, &pdev->dev);
- if (match)
- pdm->version = (uintptr_t)match->data;
-
+ pdm->version = (enum rk_pdm_version)device_get_match_data(&pdev->dev);
if (pdm->version == RK_PDM_RK3308) {
pdm->reset = devm_reset_control_get(&pdev->dev, "pdm-m");
if (IS_ERR(pdm->reset))