* [PATCH -next] ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()
@ 2016-08-23 23:10 Wei Yongjun
2016-08-24 7:01 ` Peter Ujfalusi
2016-08-24 11:20 ` Applied "ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()" to the asoc tree Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2016-08-23 23:10 UTC (permalink / raw)
To: Peter Ujfalusi, Jarkko Nikula, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, linux-omap, Wei Yongjun
From: Wei Yongjun <weiyongjun1@huawei.com>
Using devm_snd_soc_register_card() can make the code
shorter and cleaner.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
sound/soc/omap/omap-abe-twl6040.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c
index f61b3b5..89fe95e 100644
--- a/sound/soc/omap/omap-abe-twl6040.c
+++ b/sound/soc/omap/omap-abe-twl6040.c
@@ -305,23 +305,14 @@ static int omap_abe_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, priv);
- ret = snd_soc_register_card(card);
+ ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret)
- dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
+ dev_err(&pdev->dev, "devm_snd_soc_register_card() failed: %d\n",
ret);
return ret;
}
-static int omap_abe_remove(struct platform_device *pdev)
-{
- struct snd_soc_card *card = platform_get_drvdata(pdev);
-
- snd_soc_unregister_card(card);
-
- return 0;
-}
-
static const struct of_device_id omap_abe_of_match[] = {
{.compatible = "ti,abe-twl6040", },
{ },
@@ -335,7 +326,6 @@ static struct platform_driver omap_abe_driver = {
.of_match_table = omap_abe_of_match,
},
.probe = omap_abe_probe,
- .remove = omap_abe_remove,
};
static int __init omap_abe_init(void)
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH -next] ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()
2016-08-23 23:10 [PATCH -next] ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card() Wei Yongjun
@ 2016-08-24 7:01 ` Peter Ujfalusi
2016-08-24 11:20 ` Applied "ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()" to the asoc tree Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Peter Ujfalusi @ 2016-08-24 7:01 UTC (permalink / raw)
To: Wei Yongjun, Jarkko Nikula, Liam Girdwood, Mark Brown,
Jaroslav Kysela, Takashi Iwai
Cc: alsa-devel, linux-omap, Wei Yongjun
On 08/24/16 02:10, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Using devm_snd_soc_register_card() can make the code
> shorter and cleaner.
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> sound/soc/omap/omap-abe-twl6040.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c
> index f61b3b5..89fe95e 100644
> --- a/sound/soc/omap/omap-abe-twl6040.c
> +++ b/sound/soc/omap/omap-abe-twl6040.c
> @@ -305,23 +305,14 @@ static int omap_abe_probe(struct platform_device *pdev)
>
> snd_soc_card_set_drvdata(card, priv);
>
> - ret = snd_soc_register_card(card);
> + ret = devm_snd_soc_register_card(&pdev->dev, card);
> if (ret)
> - dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
> + dev_err(&pdev->dev, "devm_snd_soc_register_card() failed: %d\n",
> ret);
>
> return ret;
> }
>
> -static int omap_abe_remove(struct platform_device *pdev)
> -{
> - struct snd_soc_card *card = platform_get_drvdata(pdev);
> -
> - snd_soc_unregister_card(card);
> -
> - return 0;
> -}
> -
> static const struct of_device_id omap_abe_of_match[] = {
> {.compatible = "ti,abe-twl6040", },
> { },
> @@ -335,7 +326,6 @@ static struct platform_driver omap_abe_driver = {
> .of_match_table = omap_abe_of_match,
> },
> .probe = omap_abe_probe,
> - .remove = omap_abe_remove,
> };
>
> static int __init omap_abe_init(void)
>
>
>
--
Péter
^ permalink raw reply [flat|nested] 3+ messages in thread* Applied "ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()" to the asoc tree
2016-08-23 23:10 [PATCH -next] ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card() Wei Yongjun
2016-08-24 7:01 ` Peter Ujfalusi
@ 2016-08-24 11:20 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2016-08-24 11:20 UTC (permalink / raw)
To: Wei Yongjun
Cc: alsa-devel, linux-omap, Takashi Iwai, Liam Girdwood,
Peter Ujfalusi, Mark Brown, Jarkko Nikula
The patch
ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 687df1ad848102da9ea1ee8b0c64c2576ceb60f6 Mon Sep 17 00:00:00 2001
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Tue, 23 Aug 2016 23:10:17 +0000
Subject: [PATCH] ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()
Using devm_snd_soc_register_card() can make the code
shorter and cleaner.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/omap/omap-abe-twl6040.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c
index f61b3b58083b..89fe95e877db 100644
--- a/sound/soc/omap/omap-abe-twl6040.c
+++ b/sound/soc/omap/omap-abe-twl6040.c
@@ -305,23 +305,14 @@ static int omap_abe_probe(struct platform_device *pdev)
snd_soc_card_set_drvdata(card, priv);
- ret = snd_soc_register_card(card);
+ ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret)
- dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
+ dev_err(&pdev->dev, "devm_snd_soc_register_card() failed: %d\n",
ret);
return ret;
}
-static int omap_abe_remove(struct platform_device *pdev)
-{
- struct snd_soc_card *card = platform_get_drvdata(pdev);
-
- snd_soc_unregister_card(card);
-
- return 0;
-}
-
static const struct of_device_id omap_abe_of_match[] = {
{.compatible = "ti,abe-twl6040", },
{ },
@@ -335,7 +326,6 @@ static struct platform_driver omap_abe_driver = {
.of_match_table = omap_abe_of_match,
},
.probe = omap_abe_probe,
- .remove = omap_abe_remove,
};
static int __init omap_abe_init(void)
--
2.8.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-24 11:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 23:10 [PATCH -next] ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card() Wei Yongjun
2016-08-24 7:01 ` Peter Ujfalusi
2016-08-24 11:20 ` Applied "ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox