Skip to content

Commit

Permalink
dma: sh: remove unnecessary platform_set_drvdata()
Browse files Browse the repository at this point in the history
The driver core clears the driver data to NULL after device_release
or on probe failure. Thus, it is not needed to manually clear the
device driver data to NULL.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Jingoo Han authored and Vinod Koul committed Aug 27, 2013
1 parent 1e69653 commit eb262a5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions drivers/dma/sh/shdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,6 @@ static int sh_dmae_probe(struct platform_device *pdev)
pm_runtime_put(&pdev->dev);
pm_runtime_disable(&pdev->dev);

platform_set_drvdata(pdev, NULL);
shdma_cleanup(&shdev->shdma_dev);
eshdma:
synchronize_rcu();
Expand Down Expand Up @@ -919,8 +918,6 @@ static int sh_dmae_remove(struct platform_device *pdev)
sh_dmae_chan_remove(shdev);
shdma_cleanup(&shdev->shdma_dev);

platform_set_drvdata(pdev, NULL);

synchronize_rcu();

return 0;
Expand Down
2 changes: 0 additions & 2 deletions drivers/dma/sh/sudmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ static int sudmac_probe(struct platform_device *pdev)
chan_probe_err:
sudmac_chan_remove(su_dev);

platform_set_drvdata(pdev, NULL);
shdma_cleanup(&su_dev->shdma_dev);

return err;
Expand All @@ -405,7 +404,6 @@ static int sudmac_remove(struct platform_device *pdev)
dma_async_device_unregister(dma_dev);
sudmac_chan_remove(su_dev);
shdma_cleanup(&su_dev->shdma_dev);
platform_set_drvdata(pdev, NULL);

return 0;
}
Expand Down

0 comments on commit eb262a5

Please sign in to comment.