* [PATCH 1/3] ASoC: imx-sgtl5000: Use devm_snd_soc_register_card
@ 2013-09-17 4:12 Sachin Kamat
2013-09-17 4:12 ` [PATCH 2/3] ASoC: imx-spdif: " Sachin Kamat
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Sachin Kamat @ 2013-09-17 4:12 UTC (permalink / raw)
To: alsa-devel; +Cc: sachin.kamat, broonie, lgirdwood, shawn.guo
devm_snd_soc_register_card makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
This series compile tested.
---
sound/soc/fsl/imx-sgtl5000.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/sound/soc/fsl/imx-sgtl5000.c b/sound/soc/fsl/imx-sgtl5000.c
index 46c5b4f..78f86d8 100644
--- a/sound/soc/fsl/imx-sgtl5000.c
+++ b/sound/soc/fsl/imx-sgtl5000.c
@@ -159,7 +159,7 @@ static int imx_sgtl5000_probe(struct platform_device *pdev)
data->card.dapm_widgets = imx_sgtl5000_dapm_widgets;
data->card.num_dapm_widgets = ARRAY_SIZE(imx_sgtl5000_dapm_widgets);
- ret = snd_soc_register_card(&data->card);
+ ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
goto fail;
@@ -180,15 +180,6 @@ fail:
return ret;
}
-static int imx_sgtl5000_remove(struct platform_device *pdev)
-{
- struct imx_sgtl5000_data *data = platform_get_drvdata(pdev);
-
- snd_soc_unregister_card(&data->card);
-
- return 0;
-}
-
static const struct of_device_id imx_sgtl5000_dt_ids[] = {
{ .compatible = "fsl,imx-audio-sgtl5000", },
{ /* sentinel */ }
@@ -202,7 +193,6 @@ static struct platform_driver imx_sgtl5000_driver = {
.of_match_table = imx_sgtl5000_dt_ids,
},
.probe = imx_sgtl5000_probe,
- .remove = imx_sgtl5000_remove,
};
module_platform_driver(imx_sgtl5000_driver);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] ASoC: imx-spdif: Use devm_snd_soc_register_card
2013-09-17 4:12 [PATCH 1/3] ASoC: imx-sgtl5000: Use devm_snd_soc_register_card Sachin Kamat
@ 2013-09-17 4:12 ` Sachin Kamat
2013-09-17 4:12 ` [PATCH 3/3] ASoC: imx-wm8962: " Sachin Kamat
2013-09-19 13:57 ` [PATCH 1/3] ASoC: imx-sgtl5000: " Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2013-09-17 4:12 UTC (permalink / raw)
To: alsa-devel; +Cc: sachin.kamat, broonie, lgirdwood, shawn.guo
devm_snd_soc_register_card makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
sound/soc/fsl/imx-spdif.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c
index 816013b..8499d52 100644
--- a/sound/soc/fsl/imx-spdif.c
+++ b/sound/soc/fsl/imx-spdif.c
@@ -87,7 +87,7 @@ static int imx_spdif_audio_probe(struct platform_device *pdev)
if (ret)
goto error_dir;
- ret = snd_soc_register_card(&data->card);
+ ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card failed: %d\n", ret);
goto error_dir;
@@ -119,8 +119,6 @@ static int imx_spdif_audio_remove(struct platform_device *pdev)
if (data->txdev)
platform_device_unregister(data->txdev);
- snd_soc_unregister_card(&data->card);
-
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] ASoC: imx-wm8962: Use devm_snd_soc_register_card
2013-09-17 4:12 [PATCH 1/3] ASoC: imx-sgtl5000: Use devm_snd_soc_register_card Sachin Kamat
2013-09-17 4:12 ` [PATCH 2/3] ASoC: imx-spdif: " Sachin Kamat
@ 2013-09-17 4:12 ` Sachin Kamat
2013-09-19 13:57 ` [PATCH 1/3] ASoC: imx-sgtl5000: " Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2013-09-17 4:12 UTC (permalink / raw)
To: alsa-devel; +Cc: sachin.kamat, broonie, lgirdwood, shawn.guo
devm_snd_soc_register_card makes code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
sound/soc/fsl/imx-wm8962.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/fsl/imx-wm8962.c b/sound/soc/fsl/imx-wm8962.c
index 722afe6..6c60666 100644
--- a/sound/soc/fsl/imx-wm8962.c
+++ b/sound/soc/fsl/imx-wm8962.c
@@ -266,7 +266,7 @@ static int imx_wm8962_probe(struct platform_device *pdev)
data->card.late_probe = imx_wm8962_late_probe;
data->card.set_bias_level = imx_wm8962_set_bias_level;
- ret = snd_soc_register_card(&data->card);
+ ret = devm_snd_soc_register_card(&pdev->dev, &data->card);
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n", ret);
goto clk_fail;
@@ -296,7 +296,6 @@ static int imx_wm8962_remove(struct platform_device *pdev)
if (!IS_ERR(data->codec_clk))
clk_disable_unprepare(data->codec_clk);
- snd_soc_unregister_card(&data->card);
return 0;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] ASoC: imx-sgtl5000: Use devm_snd_soc_register_card
2013-09-17 4:12 [PATCH 1/3] ASoC: imx-sgtl5000: Use devm_snd_soc_register_card Sachin Kamat
2013-09-17 4:12 ` [PATCH 2/3] ASoC: imx-spdif: " Sachin Kamat
2013-09-17 4:12 ` [PATCH 3/3] ASoC: imx-wm8962: " Sachin Kamat
@ 2013-09-19 13:57 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-09-19 13:57 UTC (permalink / raw)
To: Sachin Kamat; +Cc: alsa-devel, shawn.guo, lgirdwood
[-- Attachment #1.1: Type: text/plain, Size: 133 bytes --]
On Tue, Sep 17, 2013 at 09:42:46AM +0530, Sachin Kamat wrote:
> devm_snd_soc_register_card makes code simpler.
Applied all, 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] 4+ messages in thread
end of thread, other threads:[~2013-09-19 13:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-17 4:12 [PATCH 1/3] ASoC: imx-sgtl5000: Use devm_snd_soc_register_card Sachin Kamat
2013-09-17 4:12 ` [PATCH 2/3] ASoC: imx-spdif: " Sachin Kamat
2013-09-17 4:12 ` [PATCH 3/3] ASoC: imx-wm8962: " Sachin Kamat
2013-09-19 13:57 ` [PATCH 1/3] ASoC: imx-sgtl5000: " 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).