All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata()
@ 2013-08-23 21:14 Fabio Estevam
  2013-08-23 21:14 ` [PATCH v2 2/2] ASoC: fsl_spdif: Reduce the noise on comments Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Fabio Estevam @ 2013-08-23 21:14 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel, b42378

From: Fabio Estevam <fabio.estevam@freescale.com>

Driver core clears the driver data to NULL after device_release or on probe 
failure, so just remove it from here.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- Also remove dev_set_drvdata from the remove function

 sound/soc/fsl/fsl_spdif.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 42a4382..a8ef46a 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -1184,7 +1184,7 @@ static int fsl_spdif_probe(struct platform_device *pdev)
 					 &spdif_priv->cpu_dai_drv, 1);
 	if (ret) {
 		dev_err(&pdev->dev, "failed to register DAI: %d\n", ret);
-		goto error_dev;
+		return ret;
 	}
 
 	ret = imx_pcm_dma_init(pdev);
@@ -1197,8 +1197,6 @@ static int fsl_spdif_probe(struct platform_device *pdev)
 
 error_component:
 	snd_soc_unregister_component(&pdev->dev);
-error_dev:
-	dev_set_drvdata(&pdev->dev, NULL);
 
 	return ret;
 }
@@ -1207,7 +1205,6 @@ static int fsl_spdif_remove(struct platform_device *pdev)
 {
 	imx_pcm_dma_exit(pdev);
 	snd_soc_unregister_component(&pdev->dev);
-	dev_set_drvdata(&pdev->dev, NULL);
 
 	return 0;
 }
-- 
1.8.1.2

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

* [PATCH v2 2/2] ASoC: fsl_spdif: Reduce the noise on comments
  2013-08-23 21:14 [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata() Fabio Estevam
@ 2013-08-23 21:14 ` Fabio Estevam
  2013-08-26  6:07   ` Nicolin Chen
  2013-08-26  6:05 ` [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata() Nicolin Chen
  2013-08-26 11:53 ` Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2013-08-23 21:14 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel, b42378

From: Fabio Estevam <fabio.estevam@freescale.com>

Remove the "====" pattern to let the comments cleaner and more uniform.

Also, do not use multi-line style for a single line comment. 

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- None
 sound/soc/fsl/fsl_spdif.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index bf58086..34b531b 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -555,7 +555,6 @@ struct snd_soc_dai_ops fsl_spdif_dai_ops = {
 
 
 /*
- * ============================================
  * FSL SPDIF IEC958 controller(mixer) functions
  *
  *	Channel status get/put control
@@ -563,7 +562,6 @@ struct snd_soc_dai_ops fsl_spdif_dai_ops = {
  *	Valid bit value get control
  *	DPLL lock status get control
  *	User bit sync mode selection control
- * ============================================
  */
 
 static int fsl_spdif_info(struct snd_kcontrol *kcontrol,
@@ -942,11 +940,7 @@ static const struct snd_soc_component_driver fsl_spdif_component = {
 	.name		= "fsl-spdif",
 };
 
-/*
- * ================
- * FSL SPDIF REGMAP
- * ================
- */
+/* FSL SPDIF REGMAP */
 
 static bool fsl_spdif_readable_reg(struct device *dev, unsigned int reg)
 {
-- 
1.8.1.2

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

* Re: [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata()
  2013-08-23 21:14 [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata() Fabio Estevam
  2013-08-23 21:14 ` [PATCH v2 2/2] ASoC: fsl_spdif: Reduce the noise on comments Fabio Estevam
@ 2013-08-26  6:05 ` Nicolin Chen
  2013-08-26 11:52   ` Mark Brown
  2013-08-26 11:53 ` Mark Brown
  2 siblings, 1 reply; 7+ messages in thread
From: Nicolin Chen @ 2013-08-26  6:05 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, broonie

Good to know this. Thank you :)

Acked-by: Nicolin Chen <b42378@freescale.com>
(
 I'm not sure if I can use 'Acked-by'.
 If not, pls replace it to 'Reviewed-by'
 Thanks a lot.
)

On Fri, Aug 23, 2013 at 06:14:45PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Driver core clears the driver data to NULL after device_release or on probe 
> failure, so just remove it from here.
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
> Changes since v1:
> - Also remove dev_set_drvdata from the remove function
> 
>  sound/soc/fsl/fsl_spdif.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
> index 42a4382..a8ef46a 100644
> --- a/sound/soc/fsl/fsl_spdif.c
> +++ b/sound/soc/fsl/fsl_spdif.c
> @@ -1184,7 +1184,7 @@ static int fsl_spdif_probe(struct platform_device *pdev)
>  					 &spdif_priv->cpu_dai_drv, 1);
>  	if (ret) {
>  		dev_err(&pdev->dev, "failed to register DAI: %d\n", ret);
> -		goto error_dev;
> +		return ret;
>  	}
>  
>  	ret = imx_pcm_dma_init(pdev);
> @@ -1197,8 +1197,6 @@ static int fsl_spdif_probe(struct platform_device *pdev)
>  
>  error_component:
>  	snd_soc_unregister_component(&pdev->dev);
> -error_dev:
> -	dev_set_drvdata(&pdev->dev, NULL);
>  
>  	return ret;
>  }
> @@ -1207,7 +1205,6 @@ static int fsl_spdif_remove(struct platform_device *pdev)
>  {
>  	imx_pcm_dma_exit(pdev);
>  	snd_soc_unregister_component(&pdev->dev);
> -	dev_set_drvdata(&pdev->dev, NULL);
>  
>  	return 0;
>  }
> -- 
> 1.8.1.2
> 
> 

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

* Re: [PATCH v2 2/2] ASoC: fsl_spdif: Reduce the noise on comments
  2013-08-23 21:14 ` [PATCH v2 2/2] ASoC: fsl_spdif: Reduce the noise on comments Fabio Estevam
@ 2013-08-26  6:07   ` Nicolin Chen
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolin Chen @ 2013-08-26  6:07 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, broonie

On Fri, Aug 23, 2013 at 06:14:46PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Remove the "====" pattern to let the comments cleaner and more uniform.
> 
> Also, do not use multi-line style for a single line comment. 
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>

Well, I just wanted to make it distinct.

But I'm fairly okay with this patch.

Thank you.

Acked-by: Nicolin Chen <b42378@freescale.com>

Best regards,
Nicolin Chen

> ---
> Changes since v1:
> - None
>  sound/soc/fsl/fsl_spdif.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
> index bf58086..34b531b 100644
> --- a/sound/soc/fsl/fsl_spdif.c
> +++ b/sound/soc/fsl/fsl_spdif.c
> @@ -555,7 +555,6 @@ struct snd_soc_dai_ops fsl_spdif_dai_ops = {
>  
>  
>  /*
> - * ============================================
>   * FSL SPDIF IEC958 controller(mixer) functions
>   *
>   *	Channel status get/put control
> @@ -563,7 +562,6 @@ struct snd_soc_dai_ops fsl_spdif_dai_ops = {
>   *	Valid bit value get control
>   *	DPLL lock status get control
>   *	User bit sync mode selection control
> - * ============================================
>   */
>  
>  static int fsl_spdif_info(struct snd_kcontrol *kcontrol,
> @@ -942,11 +940,7 @@ static const struct snd_soc_component_driver fsl_spdif_component = {
>  	.name		= "fsl-spdif",
>  };
>  
> -/*
> - * ================
> - * FSL SPDIF REGMAP
> - * ================
> - */
> +/* FSL SPDIF REGMAP */
>  
>  static bool fsl_spdif_readable_reg(struct device *dev, unsigned int reg)
>  {
> -- 
> 1.8.1.2
> 
> 

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

* Re: [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata()
  2013-08-26  6:05 ` [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata() Nicolin Chen
@ 2013-08-26 11:52   ` Mark Brown
  2013-08-27  1:57     ` Nicolin Chen
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2013-08-26 11:52 UTC (permalink / raw)
  To: Nicolin Chen; +Cc: Fabio Estevam, alsa-devel, Fabio Estevam


[-- Attachment #1.1: Type: text/plain, Size: 415 bytes --]

On Mon, Aug 26, 2013 at 02:05:56PM +0800, Nicolin Chen wrote:
> Good to know this. Thank you :)
> 
> Acked-by: Nicolin Chen <b42378@freescale.com>
> (
>  I'm not sure if I can use 'Acked-by'.
>  If not, pls replace it to 'Reviewed-by'
>  Thanks a lot.

Reviwed-by: is actually better - acked just means that you don't mind
the patch while reviewed means that you actaully did a proper review and
so on.

[-- 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] 7+ messages in thread

* Re: [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata()
  2013-08-23 21:14 [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata() Fabio Estevam
  2013-08-23 21:14 ` [PATCH v2 2/2] ASoC: fsl_spdif: Reduce the noise on comments Fabio Estevam
  2013-08-26  6:05 ` [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata() Nicolin Chen
@ 2013-08-26 11:53 ` Mark Brown
  2 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2013-08-26 11:53 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: Fabio Estevam, alsa-devel, b42378


[-- Attachment #1.1: Type: text/plain, Size: 262 bytes --]

On Fri, Aug 23, 2013 at 06:14:45PM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
> 
> Driver core clears the driver data to NULL after device_release or on probe 
> failure, so just remove it from here.

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] 7+ messages in thread

* Re: [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata()
  2013-08-26 11:52   ` Mark Brown
@ 2013-08-27  1:57     ` Nicolin Chen
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolin Chen @ 2013-08-27  1:57 UTC (permalink / raw)
  To: Mark Brown; +Cc: Fabio Estevam, alsa-devel, Fabio Estevam

On Mon, Aug 26, 2013 at 12:52:55PM +0100, Mark Brown wrote:
> On Mon, Aug 26, 2013 at 02:05:56PM +0800, Nicolin Chen wrote:
> > Good to know this. Thank you :)
> > 
> > Acked-by: Nicolin Chen <b42378@freescale.com>
> > (
> >  I'm not sure if I can use 'Acked-by'.
> >  If not, pls replace it to 'Reviewed-by'
> >  Thanks a lot.
> 
> Reviwed-by: is actually better - acked just means that you don't mind
> the patch while reviewed means that you actaully did a proper review and
> so on.

Thank you for the explain :)

Nicolin

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

end of thread, other threads:[~2013-08-27  2:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-23 21:14 [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata() Fabio Estevam
2013-08-23 21:14 ` [PATCH v2 2/2] ASoC: fsl_spdif: Reduce the noise on comments Fabio Estevam
2013-08-26  6:07   ` Nicolin Chen
2013-08-26  6:05 ` [PATCH v2 1/2] ASoC: fsl_spdif: Remove unnecessary dev_set_drvdata() Nicolin Chen
2013-08-26 11:52   ` Mark Brown
2013-08-27  1:57     ` Nicolin Chen
2013-08-26 11:53 ` 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.