summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
diff options
context:
space:
mode:
authorTzung-Bi Shih <tzungbi@google.com>2021-12-27 09:21:53 +0300
committerMark Brown <broonie@kernel.org>2021-12-29 15:45:45 +0300
commit3667a037e50a31555276a7989435126e501f0f15 (patch)
treeea5e634dcbae832bba7896be419ac6aff7eed242 /sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
parent8f85317292f1d99e8a70a400a46ee697d64e3326 (diff)
downloadlinux-3667a037e50a31555276a7989435126e501f0f15.tar.xz
ASoC: mediatek: use of_device_get_match_data()
Uses of_device_get_match_data() helper to clean some boilerplate code. Signed-off-by: Tzung-Bi Shih <tzungbi@google.com> Link: https://lore.kernel.org/r/20211227062153.3887447-1-tzungbi@google.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c')
-rw-r--r--sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
index 2552f30d8fe4..f7daad1bfe1e 100644
--- a/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
+++ b/sound/soc/mediatek/mt8192/mt8192-mt6359-rt1015-rt5682.c
@@ -1106,7 +1106,6 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev)
struct device_node *platform_node, *hdmi_codec;
int ret, i;
struct snd_soc_dai_link *dai_link;
- const struct of_device_id *match;
struct mt8192_mt6359_priv *priv;
platform_node = of_parse_phandle(pdev->dev.of_node,
@@ -1116,11 +1115,9 @@ static int mt8192_mt6359_dev_probe(struct platform_device *pdev)
return -EINVAL;
}
- match = of_match_device(pdev->dev.driver->of_match_table, &pdev->dev);
- if (!match || !match->data)
+ card = (struct snd_soc_card *)of_device_get_match_data(&pdev->dev);
+ if (!card)
return -EINVAL;
-
- card = (struct snd_soc_card *)match->data;
card->dev = &pdev->dev;
hdmi_codec = of_parse_phandle(pdev->dev.of_node,