mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: simple-card: Use devm_snd_soc_register_card()
@ 2013-12-19  3:59 Xiubo Li
  2013-12-19  7:55 ` [alsa-devel] " Kuninori Morimoto
  2013-12-19 10:23 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Xiubo Li @ 2013-12-19  3:59 UTC (permalink / raw)
  To: broonie, perex, tiwai
  Cc: kuninori.morimoto.gx, fabio.estevam, alsa-devel, linux-kernel

Makes the code slightly shorter.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
 sound/soc/generic/simple-card.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 7a9b6b4..3d190d0 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -234,14 +234,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
 	cinfo->snd_card.num_links	= 1;
 	cinfo->snd_card.dev		= &pdev->dev;
 
-	return snd_soc_register_card(&cinfo->snd_card);
-}
-
-static int asoc_simple_card_remove(struct platform_device *pdev)
-{
-	struct asoc_simple_card_info *cinfo = pdev->dev.platform_data;
-
-	return snd_soc_unregister_card(&cinfo->snd_card);
+	return devm_snd_soc_register_card(&pdev->dev, &cinfo->snd_card);
 }
 
 static const struct of_device_id asoc_simple_of_match[] = {
@@ -257,7 +250,6 @@ static struct platform_driver asoc_simple_card = {
 		.of_match_table = asoc_simple_of_match,
 	},
 	.probe		= asoc_simple_card_probe,
-	.remove		= asoc_simple_card_remove,
 };
 
 module_platform_driver(asoc_simple_card);
-- 
1.8.4



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [alsa-devel] [PATCH] ASoC: simple-card: Use devm_snd_soc_register_card()
  2013-12-19  3:59 [PATCH] ASoC: simple-card: Use devm_snd_soc_register_card() Xiubo Li
@ 2013-12-19  7:55 ` Kuninori Morimoto
  2013-12-19 10:23 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Kuninori Morimoto @ 2013-12-19  7:55 UTC (permalink / raw)
  To: Xiubo Li
  Cc: broonie, perex, tiwai, fabio.estevam, alsa-devel, linux-kernel,
	kuninori.morimoto.gx


Hi

> Makes the code slightly shorter.
> 
> Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
> ---

Nice catch

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ASoC: simple-card: Use devm_snd_soc_register_card()
  2013-12-19  3:59 [PATCH] ASoC: simple-card: Use devm_snd_soc_register_card() Xiubo Li
  2013-12-19  7:55 ` [alsa-devel] " Kuninori Morimoto
@ 2013-12-19 10:23 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-12-19 10:23 UTC (permalink / raw)
  To: Xiubo Li
  Cc: perex, tiwai, kuninori.morimoto.gx, fabio.estevam, alsa-devel,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 111 bytes --]

On Thu, Dec 19, 2013 at 11:59:54AM +0800, Xiubo Li wrote:
> Makes the code slightly shorter.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-19 10:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-19  3:59 [PATCH] ASoC: simple-card: Use devm_snd_soc_register_card() Xiubo Li
2013-12-19  7:55 ` [alsa-devel] " Kuninori Morimoto
2013-12-19 10:23 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®