diff options
author | Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> | 2022-01-10 09:47:08 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-01-24 13:31:29 +0000 |
commit | 0788785c78342d422f93b1c9831c2b2b7f137937 (patch) | |
tree | 18ba45c3796f655124682682e20a1f6c57b4d415 | |
parent | 6570f991582e32b7992601d0497c61962a2c5dcc (diff) | |
download | linux-stable-0788785c78342d422f93b1c9831c2b2b7f137937.tar.gz linux-stable-0788785c78342d422f93b1c9831c2b2b7f137937.tar.bz2 linux-stable-0788785c78342d422f93b1c9831c2b2b7f137937.zip |
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: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20220110094711.8574-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/sh/rz-ssi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/sh/rz-ssi.c b/sound/soc/sh/rz-ssi.c index 2ac2c9722b3b..7379b1489e35 100644 --- a/sound/soc/sh/rz-ssi.c +++ b/sound/soc/sh/rz-ssi.c @@ -977,6 +977,9 @@ static int rz_ssi_probe(struct platform_device *pdev) ssi->playback.priv = ssi; ssi->capture.priv = ssi; + spin_lock_init(&ssi->lock); + dev_set_drvdata(&pdev->dev, ssi); + /* Error Interrupt */ ssi->irq_int = platform_get_irq_byname(pdev, "int_req"); if (ssi->irq_int < 0) @@ -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"); } - spin_lock_init(&ssi->lock); - dev_set_drvdata(&pdev->dev, ssi); ret = devm_snd_soc_register_component(&pdev->dev, &rz_ssi_soc_component, rz_ssi_soc_dai, ARRAY_SIZE(rz_ssi_soc_dai)); |