alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata()
@ 2013-08-26 12:25 Fabio Estevam
  2013-08-26 12:25 ` [PATCH 2/3] ASoC: ep93xx-i2s: " Fabio Estevam
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Fabio Estevam @ 2013-08-26 12:25 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

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>
---
 sound/soc/fsl/fsl_ssi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 0c072ff..6f4a4c5 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -909,7 +909,6 @@ error_dai:
 	snd_soc_unregister_component(&pdev->dev);
 
 error_dev:
-	dev_set_drvdata(&pdev->dev, NULL);
 	device_remove_file(&pdev->dev, dev_attr);
 
 error_clk:
@@ -935,7 +934,6 @@ static int fsl_ssi_remove(struct platform_device *pdev)
 	snd_soc_unregister_component(&pdev->dev);
 	device_remove_file(&pdev->dev, &ssi_private->dev_attr);
 	irq_dispose_mapping(ssi_private->irq);
-	dev_set_drvdata(&pdev->dev, NULL);
 
 	return 0;
 }
-- 
1.8.1.2

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

* [PATCH 2/3] ASoC: ep93xx-i2s: Remove unnecessary dev_set_drvdata()
  2013-08-26 12:25 [PATCH 1/3] ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata() Fabio Estevam
@ 2013-08-26 12:25 ` Fabio Estevam
  2013-08-29 12:21   ` Mark Brown
  2013-08-26 12:25 ` [PATCH 3/3] ASoC: designware_i2s: " Fabio Estevam
  2013-08-26 19:42 ` [PATCH 1/3] ASoC: fsl_ssi: " Mark Brown
  2 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2013-08-26 12:25 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

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>
---
 sound/soc/cirrus/ep93xx-i2s.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c
index f23f331..a57643d 100644
--- a/sound/soc/cirrus/ep93xx-i2s.c
+++ b/sound/soc/cirrus/ep93xx-i2s.c
@@ -408,7 +408,6 @@ static int ep93xx_i2s_probe(struct platform_device *pdev)
 	return 0;
 
 fail_put_lrclk:
-	dev_set_drvdata(&pdev->dev, NULL);
 	clk_put(info->lrclk);
 fail_put_sclk:
 	clk_put(info->sclk);
@@ -423,7 +422,6 @@ static int ep93xx_i2s_remove(struct platform_device *pdev)
 	struct ep93xx_i2s_info *info = dev_get_drvdata(&pdev->dev);
 
 	snd_soc_unregister_component(&pdev->dev);
-	dev_set_drvdata(&pdev->dev, NULL);
 	clk_put(info->lrclk);
 	clk_put(info->sclk);
 	clk_put(info->mclk);
-- 
1.8.1.2

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

* [PATCH 3/3] ASoC: designware_i2s: Remove unnecessary dev_set_drvdata()
  2013-08-26 12:25 [PATCH 1/3] ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata() Fabio Estevam
  2013-08-26 12:25 ` [PATCH 2/3] ASoC: ep93xx-i2s: " Fabio Estevam
@ 2013-08-26 12:25 ` Fabio Estevam
  2013-08-29 12:18   ` Mark Brown
  2013-08-26 19:42 ` [PATCH 1/3] ASoC: fsl_ssi: " Mark Brown
  2 siblings, 1 reply; 6+ messages in thread
From: Fabio Estevam @ 2013-08-26 12:25 UTC (permalink / raw)
  To: broonie; +Cc: Fabio Estevam, alsa-devel

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>
---
 sound/soc/dwc/designware_i2s.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/dwc/designware_i2s.c b/sound/soc/dwc/designware_i2s.c
index 70eb37a..25c31f1 100644
--- a/sound/soc/dwc/designware_i2s.c
+++ b/sound/soc/dwc/designware_i2s.c
@@ -421,13 +421,11 @@ static int dw_i2s_probe(struct platform_device *pdev)
 					 dw_i2s_dai, 1);
 	if (ret != 0) {
 		dev_err(&pdev->dev, "not able to register dai\n");
-		goto err_set_drvdata;
+		goto err_clk_disable;
 	}
 
 	return 0;
 
-err_set_drvdata:
-	dev_set_drvdata(&pdev->dev, NULL);
 err_clk_disable:
 	clk_disable(dev->clk);
 err_clk_put:
@@ -440,7 +438,6 @@ static int dw_i2s_remove(struct platform_device *pdev)
 	struct dw_i2s_dev *dev = dev_get_drvdata(&pdev->dev);
 
 	snd_soc_unregister_component(&pdev->dev);
-	dev_set_drvdata(&pdev->dev, NULL);
 
 	clk_put(dev->clk);
 
-- 
1.8.1.2

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

* Re: [PATCH 1/3] ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata()
  2013-08-26 12:25 [PATCH 1/3] ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata() Fabio Estevam
  2013-08-26 12:25 ` [PATCH 2/3] ASoC: ep93xx-i2s: " Fabio Estevam
  2013-08-26 12:25 ` [PATCH 3/3] ASoC: designware_i2s: " Fabio Estevam
@ 2013-08-26 19:42 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-08-26 19:42 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel


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

On Mon, Aug 26, 2013 at 09:25:13AM -0300, Fabio Estevam wrote:
> 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] 6+ messages in thread

* Re: [PATCH 3/3] ASoC: designware_i2s: Remove unnecessary dev_set_drvdata()
  2013-08-26 12:25 ` [PATCH 3/3] ASoC: designware_i2s: " Fabio Estevam
@ 2013-08-29 12:18   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-08-29 12:18 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel


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

On Mon, Aug 26, 2013 at 09:25:15AM -0300, Fabio Estevam wrote:
> 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] 6+ messages in thread

* Re: [PATCH 2/3] ASoC: ep93xx-i2s: Remove unnecessary dev_set_drvdata()
  2013-08-26 12:25 ` [PATCH 2/3] ASoC: ep93xx-i2s: " Fabio Estevam
@ 2013-08-29 12:21   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2013-08-29 12:21 UTC (permalink / raw)
  To: Fabio Estevam; +Cc: alsa-devel


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

On Mon, Aug 26, 2013 at 09:25:14AM -0300, Fabio Estevam wrote:
> Driver core clears the driver data to NULL after device_release or on probe
> failure, so just remove it from here.

Applied, thanks.  The actual thing here is a bit deeper - if anything
ever relies on the driver data being set after remove() it's buggy
anyway, setting it to NULL at all is pretty much ornamental.

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

end of thread, other threads:[~2013-08-29 12:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-26 12:25 [PATCH 1/3] ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata() Fabio Estevam
2013-08-26 12:25 ` [PATCH 2/3] ASoC: ep93xx-i2s: " Fabio Estevam
2013-08-29 12:21   ` Mark Brown
2013-08-26 12:25 ` [PATCH 3/3] ASoC: designware_i2s: " Fabio Estevam
2013-08-29 12:18   ` Mark Brown
2013-08-26 19:42 ` [PATCH 1/3] ASoC: fsl_ssi: " 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).