[PATCH] ASoC: tegra: ADX: use of_device_get_match_data

From: Rosen Penev

Date: Thu May 21 2026 - 21:59:24 EST


Remove open coding of the function to simplify the code.

Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
sound/soc/tegra/tegra210_adx.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c
index 12371f895234..a2c28369fbc8 100644
--- a/sound/soc/tegra/tegra210_adx.c
+++ b/sound/soc/tegra/tegra210_adx.c
@@ -677,17 +677,16 @@ static int tegra210_adx_platform_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct tegra210_adx *adx;
- const struct of_device_id *match;
- struct tegra210_adx_soc_data *soc_data;
+ const struct tegra210_adx_soc_data *soc_data;
void __iomem *regs;
int err, i;

+ soc_data = of_device_get_match_data(dev);
+
adx = devm_kzalloc(dev, sizeof(*adx), GFP_KERNEL);
if (!adx)
return -ENOMEM;

- match = of_match_device(tegra210_adx_of_match, dev);
- soc_data = (struct tegra210_adx_soc_data *)match->data;
adx->soc_data = soc_data;

dev_set_drvdata(dev, adx);
--
2.54.0