* [PATCH 1/1] ASoC: mxs-saif: Use devm_snd_soc_register_component
@ 2013-09-17 4:50 Sachin Kamat
2013-09-19 13:59 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Sachin Kamat @ 2013-09-17 4:50 UTC (permalink / raw)
To: alsa-devel; +Cc: sachin.kamat, broonie, shawn.guo
devm_snd_soc_register_component makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
sound/soc/mxs/mxs-saif.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c
index b56b8a0..14152f6 100644
--- a/sound/soc/mxs/mxs-saif.c
+++ b/sound/soc/mxs/mxs-saif.c
@@ -768,8 +768,8 @@ static int mxs_saif_probe(struct platform_device *pdev)
dev_warn(&pdev->dev, "failed to init clocks\n");
}
- ret = snd_soc_register_component(&pdev->dev, &mxs_saif_component,
- &mxs_saif_dai, 1);
+ ret = devm_snd_soc_register_component(&pdev->dev, &mxs_saif_component,
+ &mxs_saif_dai, 1);
if (ret) {
dev_err(&pdev->dev, "register DAI failed\n");
return ret;
@@ -778,21 +778,15 @@ static int mxs_saif_probe(struct platform_device *pdev)
ret = mxs_pcm_platform_register(&pdev->dev);
if (ret) {
dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
- goto failed_pdev_alloc;
+ return ret;
}
return 0;
-
-failed_pdev_alloc:
- snd_soc_unregister_component(&pdev->dev);
-
- return ret;
}
static int mxs_saif_remove(struct platform_device *pdev)
{
mxs_pcm_platform_unregister(&pdev->dev);
- snd_soc_unregister_component(&pdev->dev);
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] ASoC: mxs-saif: Use devm_snd_soc_register_component
2013-09-17 4:50 [PATCH 1/1] ASoC: mxs-saif: Use devm_snd_soc_register_component Sachin Kamat
@ 2013-09-19 13:59 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2013-09-19 13:59 UTC (permalink / raw)
To: Sachin Kamat; +Cc: alsa-devel, shawn.guo
[-- Attachment #1.1: Type: text/plain, Size: 134 bytes --]
On Tue, Sep 17, 2013 at 10:20:09AM +0530, Sachin Kamat wrote:
> devm_snd_soc_register_component makes code simpler.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-19 13:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-17 4:50 [PATCH 1/1] ASoC: mxs-saif: Use devm_snd_soc_register_component Sachin Kamat
2013-09-19 13:59 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).