summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-08-17 15:14:06 +0100
committerMark Brown <broonie@kernel.org>2021-08-17 15:14:06 +0100
commit2499ee9d90795932893576cf065f967a6136bc20 (patch)
tree06a6ba07bcfb91bfe809a3dcbdd65ec628c56487 /sound
parentf8043ef50acaeb396702481bd2701066bac8a2bc (diff)
parent240fdf3f42fc6505adecaf5a74fac75b3c702cf1 (diff)
downloadlinux-stable-2499ee9d90795932893576cf065f967a6136bc20.tar.gz
linux-stable-2499ee9d90795932893576cf065f967a6136bc20.tar.bz2
linux-stable-2499ee9d90795932893576cf065f967a6136bc20.zip
Merge series "ASoC: tegra30: Fix use of of_device_get_match_data" from Aakash Hemadri <aakashhemadri123@gmail.com>:
Hi, This patchset fixes my previous incorrect patches. 356b94a32a75 ("ASoC: tegra30: i2s: Use of_device_get_match_data") 80165bb80433 ("ASoC: tegra30: ahub: Use of_device_get_match_data") Aakash Hemadri (2): ASoC: tegra30: ahub: Fix incorrect usage of of_device_get_match_data ASoC: tegra30: i2s: Fix incorrect usage of of_device_get_match_data sound/soc/tegra/tegra30_ahub.c | 6 ++---- sound/soc/tegra/tegra30_i2s.c | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) -- 2.32.0
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra30_ahub.c6
-rw-r--r--sound/soc/tegra/tegra30_i2s.c8
2 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
index 0ac109b32329..ef011a488ceb 100644
--- a/sound/soc/tegra/tegra30_ahub.c
+++ b/sound/soc/tegra/tegra30_ahub.c
@@ -512,16 +512,14 @@ static const struct of_device_id tegra30_ahub_of_match[] = {
static int tegra30_ahub_probe(struct platform_device *pdev)
{
- const struct of_device_id *match;
const struct tegra30_ahub_soc_data *soc_data;
struct resource *res0;
void __iomem *regs_apbif, *regs_ahub;
int ret = 0;
- match = of_device_get_match_data(&pdev->dev);
- if (!match)
+ soc_data = of_device_get_match_data(&pdev->dev);
+ if (!soc_data)
return -EINVAL;
- soc_data = match->data;
ahub = devm_kzalloc(&pdev->dev, sizeof(struct tegra30_ahub),
GFP_KERNEL);
diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
index d4c5594efaf1..084a533bf4f2 100644
--- a/sound/soc/tegra/tegra30_i2s.c
+++ b/sound/soc/tegra/tegra30_i2s.c
@@ -406,7 +406,7 @@ static const struct of_device_id tegra30_i2s_of_match[] = {
static int tegra30_i2s_platform_probe(struct platform_device *pdev)
{
struct tegra30_i2s *i2s;
- const struct of_device_id *match;
+ const struct tegra30_i2s_soc_data *soc_data;
u32 cif_ids[2];
void __iomem *regs;
int ret;
@@ -418,13 +418,13 @@ static int tegra30_i2s_platform_probe(struct platform_device *pdev)
}
dev_set_drvdata(&pdev->dev, i2s);
- match = of_device_get_match_data(&pdev->dev);
- if (!match) {
+ soc_data = of_device_get_match_data(&pdev->dev);
+ if (!soc_data) {
dev_err(&pdev->dev, "Error: No device match found\n");
ret = -ENODEV;
goto err;
}
- i2s->soc_data = (struct tegra30_i2s_soc_data *)match->data;
+ i2s->soc_data = soc_data;
i2s->dai = tegra30_i2s_dai_template;
i2s->dai.name = dev_name(&pdev->dev);