All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component
@ 2015-08-15  2:31 Vaishali Thakkar
  2015-08-17  7:36   ` Peter Ujfalusi
  2015-08-17 20:49 ` Applied "ASoC: davinci-vcif: Use devm_snd_soc_register_component" to the asoc tree Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Vaishali Thakkar @ 2015-08-15  2:31 UTC (permalink / raw)
  To: Mark Brown
  Cc: Jaroslav Kysela, Liam Girdwood, Takashi Iwai, Wolfram Sang,
	Peter Ujfalusi, alsa-devel, linux-kernel

Use resource managed function devm_snd_soc_register_component for
component registration instead of snd_soc_register_component.

Also, remove davinci_vcif_remove as it is now redundant.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
---
 sound/soc/davinci/davinci-vcif.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c
index fabd05f..c77d921 100644
--- a/sound/soc/davinci/davinci-vcif.c
+++ b/sound/soc/davinci/davinci-vcif.c
@@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev)
 
 	dev_set_drvdata(&pdev->dev, davinci_vcif_dev);
 
-	ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component,
-					 &davinci_vcif_dai, 1);
+	ret = devm_snd_soc_register_component(&pdev->dev,
+					      &davinci_vcif_component,
+					      &davinci_vcif_dai, 1);
 	if (ret != 0) {
 		dev_err(&pdev->dev, "could not register dai\n");
 		return ret;
@@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev)
 	ret = edma_pcm_platform_register(&pdev->dev);
 	if (ret) {
 		dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
-		snd_soc_unregister_component(&pdev->dev);
 		return ret;
 	}
 
 	return 0;
 }
 
-static int davinci_vcif_remove(struct platform_device *pdev)
-{
-	snd_soc_unregister_component(&pdev->dev);
-
-	return 0;
-}
-
 static struct platform_driver davinci_vcif_driver = {
 	.probe		= davinci_vcif_probe,
-	.remove		= davinci_vcif_remove,
 	.driver		= {
 		.name	= "davinci-vcif",
 	},
-- 
1.9.1


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

* Re: [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component
  2015-08-15  2:31 [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component Vaishali Thakkar
@ 2015-08-17  7:36   ` Peter Ujfalusi
  2015-08-17 20:49 ` Applied "ASoC: davinci-vcif: Use devm_snd_soc_register_component" to the asoc tree Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2015-08-17  7:36 UTC (permalink / raw)
  To: Vaishali Thakkar, Mark Brown
  Cc: Jaroslav Kysela, Liam Girdwood, Takashi Iwai, Wolfram Sang,
	alsa-devel, linux-kernel

On 08/15/2015 05:31 AM, Vaishali Thakkar wrote:
> Use resource managed function devm_snd_soc_register_component for
> component registration instead of snd_soc_register_component.
> 
> Also, remove davinci_vcif_remove as it is now redundant.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
> ---
>  sound/soc/davinci/davinci-vcif.c | 14 +++-----------
>  1 file changed, 3 insertions(+), 11 deletions(-)
> 
> diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c
> index fabd05f..c77d921 100644
> --- a/sound/soc/davinci/davinci-vcif.c
> +++ b/sound/soc/davinci/davinci-vcif.c
> @@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev)
>  
>  	dev_set_drvdata(&pdev->dev, davinci_vcif_dev);
>  
> -	ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component,
> -					 &davinci_vcif_dai, 1);
> +	ret = devm_snd_soc_register_component(&pdev->dev,
> +					      &davinci_vcif_component,
> +					      &davinci_vcif_dai, 1);
>  	if (ret != 0) {
>  		dev_err(&pdev->dev, "could not register dai\n");
>  		return ret;
> @@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev)
>  	ret = edma_pcm_platform_register(&pdev->dev);
>  	if (ret) {
>  		dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
> -		snd_soc_unregister_component(&pdev->dev);
>  		return ret;
>  	}
>  
>  	return 0;
>  }
>  
> -static int davinci_vcif_remove(struct platform_device *pdev)
> -{
> -	snd_soc_unregister_component(&pdev->dev);
> -
> -	return 0;
> -}
> -
>  static struct platform_driver davinci_vcif_driver = {
>  	.probe		= davinci_vcif_probe,
> -	.remove		= davinci_vcif_remove,
>  	.driver		= {
>  		.name	= "davinci-vcif",
>  	},
> 


-- 
Péter

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

* Re: [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component
@ 2015-08-17  7:36   ` Peter Ujfalusi
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Ujfalusi @ 2015-08-17  7:36 UTC (permalink / raw)
  To: Vaishali Thakkar, Mark Brown
  Cc: alsa-devel, Wolfram Sang, Liam Girdwood, linux-kernel, Takashi Iwai

On 08/15/2015 05:31 AM, Vaishali Thakkar wrote:
> Use resource managed function devm_snd_soc_register_component for
> component registration instead of snd_soc_register_component.
> 
> Also, remove davinci_vcif_remove as it is now redundant.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
> ---
>  sound/soc/davinci/davinci-vcif.c | 14 +++-----------
>  1 file changed, 3 insertions(+), 11 deletions(-)
> 
> diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c
> index fabd05f..c77d921 100644
> --- a/sound/soc/davinci/davinci-vcif.c
> +++ b/sound/soc/davinci/davinci-vcif.c
> @@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev)
>  
>  	dev_set_drvdata(&pdev->dev, davinci_vcif_dev);
>  
> -	ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component,
> -					 &davinci_vcif_dai, 1);
> +	ret = devm_snd_soc_register_component(&pdev->dev,
> +					      &davinci_vcif_component,
> +					      &davinci_vcif_dai, 1);
>  	if (ret != 0) {
>  		dev_err(&pdev->dev, "could not register dai\n");
>  		return ret;
> @@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev)
>  	ret = edma_pcm_platform_register(&pdev->dev);
>  	if (ret) {
>  		dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
> -		snd_soc_unregister_component(&pdev->dev);
>  		return ret;
>  	}
>  
>  	return 0;
>  }
>  
> -static int davinci_vcif_remove(struct platform_device *pdev)
> -{
> -	snd_soc_unregister_component(&pdev->dev);
> -
> -	return 0;
> -}
> -
>  static struct platform_driver davinci_vcif_driver = {
>  	.probe		= davinci_vcif_probe,
> -	.remove		= davinci_vcif_remove,
>  	.driver		= {
>  		.name	= "davinci-vcif",
>  	},
> 


-- 
Péter

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

* Applied "ASoC: davinci-vcif: Use devm_snd_soc_register_component" to the asoc tree
  2015-08-15  2:31 [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component Vaishali Thakkar
  2015-08-17  7:36   ` Peter Ujfalusi
@ 2015-08-17 20:49 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2015-08-17 20:49 UTC (permalink / raw)
  To: Vaishali Thakkar, Peter Ujfalusi, Mark Brown; +Cc: alsa-devel

The patch

   ASoC: davinci-vcif: Use devm_snd_soc_register_component

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 553de19a0e2f21809bc3864d40308864652521eb Mon Sep 17 00:00:00 2001
From: Vaishali Thakkar <vthakkar1994@gmail.com>
Date: Sat, 15 Aug 2015 08:01:55 +0530
Subject: [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component

Use resource managed function devm_snd_soc_register_component for
component registration instead of snd_soc_register_component.

Also, remove davinci_vcif_remove as it is now redundant.

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/davinci/davinci-vcif.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c
index fabd05f..c77d921 100644
--- a/sound/soc/davinci/davinci-vcif.c
+++ b/sound/soc/davinci/davinci-vcif.c
@@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev)
 
 	dev_set_drvdata(&pdev->dev, davinci_vcif_dev);
 
-	ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component,
-					 &davinci_vcif_dai, 1);
+	ret = devm_snd_soc_register_component(&pdev->dev,
+					      &davinci_vcif_component,
+					      &davinci_vcif_dai, 1);
 	if (ret != 0) {
 		dev_err(&pdev->dev, "could not register dai\n");
 		return ret;
@@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev)
 	ret = edma_pcm_platform_register(&pdev->dev);
 	if (ret) {
 		dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
-		snd_soc_unregister_component(&pdev->dev);
 		return ret;
 	}
 
 	return 0;
 }
 
-static int davinci_vcif_remove(struct platform_device *pdev)
-{
-	snd_soc_unregister_component(&pdev->dev);
-
-	return 0;
-}
-
 static struct platform_driver davinci_vcif_driver = {
 	.probe		= davinci_vcif_probe,
-	.remove		= davinci_vcif_remove,
 	.driver		= {
 		.name	= "davinci-vcif",
 	},
-- 
2.5.0

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

end of thread, other threads:[~2015-08-17 20:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-15  2:31 [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component Vaishali Thakkar
2015-08-17  7:36 ` Peter Ujfalusi
2015-08-17  7:36   ` Peter Ujfalusi
2015-08-17 20:49 ` Applied "ASoC: davinci-vcif: Use devm_snd_soc_register_component" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.