[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1519831218.902311745@decadent.org.uk>
Date: Wed, 28 Feb 2018 15:20:18 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org,
"Maciej S. Szmigiero" <mail@...iej.szmigiero.name>,
"Mark Brown" <broonie@...nel.org>
Subject: [PATCH 3.16 014/254] ASoC: fsl_ssi: add AC'97 ops setting check
and cleanup
3.16.55-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: "Maciej S. Szmigiero" <mail@...iej.szmigiero.name>
commit 04143d614f3af84a3f39e79a24a7ca740bd39efd upstream.
Check whether setting AC'97 ops succeeded and clean them
on removal so the fsl_ssi driver can be reloaded.
Signed-off-by: Maciej Szmigiero <mail@...iej.szmigiero.name>
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
sound/soc/fsl/fsl_ssi.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -1274,7 +1274,11 @@ static int fsl_ssi_probe(struct platform
fsl_ac97_data = ssi_private;
- snd_soc_set_ac97_ops_of_reset(&fsl_ssi_ac97_ops, pdev);
+ ret = snd_soc_set_ac97_ops_of_reset(&fsl_ssi_ac97_ops, pdev);
+ if (ret) {
+ dev_err(&pdev->dev, "could not set AC'97 ops\n");
+ return ret;
+ }
} else {
/* Initialize this copy of the CPU DAI driver structure */
memcpy(&ssi_private->cpu_dai_drv, &fsl_ssi_dai_template,
@@ -1422,6 +1426,9 @@ static int fsl_ssi_remove(struct platfor
if (ssi_private->use_dma)
irq_dispose_mapping(ssi_private->irq);
+ if (fsl_ssi_is_ac97(ssi_private))
+ snd_soc_set_ac97_ops(NULL);
+
return 0;
}
Powered by blists - more mailing lists