Skip to content

Commit

Permalink
ASoC: sun4i-i2s: Register regmap and PCM before our component
Browse files Browse the repository at this point in the history
So far the regmap and the dmaengine PCM are registered after our component
has been, which means that our driver isn't properly initialised by then.

Let's fix that.

Signed-off-by: Maxime Ripard <[email protected]>
Link: https://lore.kernel.org/r/67e303f37f141ef73ce9ed47d7f831b63c694424.1566242458.git-series.maxime.ripard@bootlin.com
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
mripard authored and broonie committed Aug 20, 2019
1 parent 0a05f2e commit bf283a0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sound/soc/sunxi/sun4i-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,11 +1148,9 @@ static int sun4i_i2s_probe(struct platform_device *pdev)
goto err_pm_disable;
}

ret = devm_snd_soc_register_component(&pdev->dev,
&sun4i_i2s_component,
&sun4i_i2s_dai, 1);
ret = sun4i_i2s_init_regmap_fields(&pdev->dev, i2s);
if (ret) {
dev_err(&pdev->dev, "Could not register DAI\n");
dev_err(&pdev->dev, "Could not initialise regmap fields\n");
goto err_suspend;
}

Expand All @@ -1162,9 +1160,11 @@ static int sun4i_i2s_probe(struct platform_device *pdev)
goto err_suspend;
}

ret = sun4i_i2s_init_regmap_fields(&pdev->dev, i2s);
ret = devm_snd_soc_register_component(&pdev->dev,
&sun4i_i2s_component,
&sun4i_i2s_dai, 1);
if (ret) {
dev_err(&pdev->dev, "Could not initialise regmap fields\n");
dev_err(&pdev->dev, "Could not register DAI\n");
goto err_suspend;
}

Expand Down

0 comments on commit bf283a0

Please sign in to comment.