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

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.