Skip to contentSkip to conversation

ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata()

PATCH Applied Fabio Estevam 2 participants 6 messages Aug 26, 2013 – Aug 29, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata()

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

---
 sound/soc/fsl/fsl_ssi.c | 2 --
 1 file changed, 2 deletions(-)
sound/soc/fsl/fsl_ssi.c +0 -2
index 0c072ff..6f4a4c5 100644
@@ -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;
 }
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 2/3 ASoC: ep93xx-i2s: Remove unnecessary dev_set_drvdata()

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

---
 sound/soc/cirrus/ep93xx-i2s.c | 2 --
 1 file changed, 2 deletions(-)
sound/soc/cirrus/ep93xx-i2s.c +0 -2
index f23f331..a57643d 100644
@@ -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);
Signature · 1 line
1.8.1.2
maintainer Applied
#2 lore raw

Re: [PATCH 2/3] ASoC: ep93xx-i2s: Remove unnecessary dev_set_drvdata()

Quoted 2 lines · Fabio Estevam

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.

#3 lore raw

PATCH 3/3 ASoC: designware_i2s: Remove unnecessary dev_set_drvdata()

In reply to Fabio Estevam

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

---
 sound/soc/dwc/designware_i2s.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/dwc/designware_i2s.c +1 -4
index 70eb37a..25c31f1 100644
@@ -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);
 
Signature · 1 line
1.8.1.2
maintainer Applied
#4 lore raw

Re: [PATCH 3/3] ASoC: designware_i2s: Remove unnecessary dev_set_drvdata()

Quoted 2 lines · Fabio Estevam

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

Applied, thanks.

maintainer Applied
#5 lore raw
In reply to Fabio Estevam
Quoted 2 lines · Fabio Estevam

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

Applied, thanks.