ASoC: fsl_ssi: Remove unnecessary dev_set_drvdata()
Subsystems (3)
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
@@ -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
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
@@ -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
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_releaseor 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.
PATCH 3/3 ASoC: designware_i2s: Remove unnecessary dev_set_drvdata()
In reply to Fabio EstevamDriver 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
@@ -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
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_releaseor on probe failure, so just remove it from here.
Applied, thanks.
Quoted 2 lines · Fabio Estevam
Driver core clears the driver data to NULL after
device_releaseor on probe failure, so just remove it from here.
Applied, thanks.