Commit 0788785c authored by Lad Prabhakar's avatar Lad Prabhakar Committed by Mark Brown

ASoC: sh: rz-ssi: Make the data structures available before registering the handlers

Initialize the spinlock and make the data structures available before
registering the interrupt handlers.
Reported-by: default avatarPavel Machek <pavel@denx.de>
Signed-off-by: default avatarLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: default avatarBiju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220110094711.8574-3-prabhakar.mahadev-lad.rj@bp.renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6570f991
...@@ -977,6 +977,9 @@ static int rz_ssi_probe(struct platform_device *pdev) ...@@ -977,6 +977,9 @@ static int rz_ssi_probe(struct platform_device *pdev)
ssi->playback.priv = ssi; ssi->playback.priv = ssi;
ssi->capture.priv = ssi; ssi->capture.priv = ssi;
spin_lock_init(&ssi->lock);
dev_set_drvdata(&pdev->dev, ssi);
/* Error Interrupt */ /* Error Interrupt */
ssi->irq_int = platform_get_irq_byname(pdev, "int_req"); ssi->irq_int = platform_get_irq_byname(pdev, "int_req");
if (ssi->irq_int < 0) if (ssi->irq_int < 0)
...@@ -1029,8 +1032,6 @@ static int rz_ssi_probe(struct platform_device *pdev) ...@@ -1029,8 +1032,6 @@ static int rz_ssi_probe(struct platform_device *pdev)
return dev_err_probe(ssi->dev, ret, "pm_runtime_resume_and_get failed\n"); return dev_err_probe(ssi->dev, ret, "pm_runtime_resume_and_get failed\n");
} }
spin_lock_init(&ssi->lock);
dev_set_drvdata(&pdev->dev, ssi);
ret = devm_snd_soc_register_component(&pdev->dev, &rz_ssi_soc_component, ret = devm_snd_soc_register_component(&pdev->dev, &rz_ssi_soc_component,
rz_ssi_soc_dai, rz_ssi_soc_dai,
ARRAY_SIZE(rz_ssi_soc_dai)); ARRAY_SIZE(rz_ssi_soc_dai));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment