diff options
author | Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | 2016-10-26 12:59:57 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-10-26 13:07:11 +0300 |
commit | 31833ead95c2c0a374f35a8ae8148c00459a0d49 (patch) | |
tree | 93db65f3eacb7550850f5422190afc4656cc7079 /sound/soc/codecs/cs47l24.c | |
parent | ae1ea48c5c5998c5730cebaa2374ab02ad4d7d4f (diff) | |
download | linux-31833ead95c2c0a374f35a8ae8148c00459a0d49.tar.xz |
ASoC: arizona: Move request of speaker IRQs into bus probe
It is more idiomatic to request all resources in the bus level probe,
this patch moves the request of the speaker thermal event IRQs from the
ASoC level probe into the bus level probe.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs47l24.c')
-rw-r--r-- | sound/soc/codecs/cs47l24.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sound/soc/codecs/cs47l24.c b/sound/soc/codecs/cs47l24.c index 7df6a6769038..17e52c1599e4 100644 --- a/sound/soc/codecs/cs47l24.c +++ b/sound/soc/codecs/cs47l24.c @@ -1170,8 +1170,6 @@ static int cs47l24_codec_remove(struct snd_soc_codec *codec) arizona_free_irq(arizona, ARIZONA_IRQ_DSP_IRQ1, priv); - arizona_free_spk(codec); - return 0; } @@ -1287,20 +1285,31 @@ static int cs47l24_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); pm_runtime_idle(&pdev->dev); + ret = arizona_init_spk_irqs(arizona); + if (ret < 0) + return ret; + ret = snd_soc_register_platform(&pdev->dev, &cs47l24_compr_platform); if (ret < 0) { dev_err(&pdev->dev, "Failed to register platform: %d\n", ret); - return ret; + goto err_spk_irqs; } ret = snd_soc_register_codec(&pdev->dev, &soc_codec_dev_cs47l24, cs47l24_dai, ARRAY_SIZE(cs47l24_dai)); if (ret < 0) { dev_err(&pdev->dev, "Failed to register codec: %d\n", ret); - snd_soc_unregister_platform(&pdev->dev); + goto err_platform; } return ret; + +err_platform: + snd_soc_unregister_platform(&pdev->dev); +err_spk_irqs: + arizona_free_spk_irqs(arizona); + + return ret; } static int cs47l24_remove(struct platform_device *pdev) @@ -1314,6 +1323,8 @@ static int cs47l24_remove(struct platform_device *pdev) wm_adsp2_remove(&cs47l24->core.adsp[1]); wm_adsp2_remove(&cs47l24->core.adsp[2]); + arizona_free_spk_irqs(arizona); + return 0; } |