diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-04-22 05:14:10 -0400 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2018-04-22 12:06:10 -0400 |
commit | ede2b295033f52c35acc089db76b71cd7f4bf243 (patch) | |
tree | 0854de45852ee9a2e4c3eb08a9172e0b8beafd8d | |
parent | 5c4a74a4144a6c394fd7ca4760f779129075d636 (diff) |
dmaengine: at_xdmac: simplify getting .drvdata
We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r-- | drivers/dma/at_xdmac.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index 94236ec9d410..4bf72561667c 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c | |||
@@ -1833,8 +1833,7 @@ static void at_xdmac_free_chan_resources(struct dma_chan *chan) | |||
1833 | #ifdef CONFIG_PM | 1833 | #ifdef CONFIG_PM |
1834 | static int atmel_xdmac_prepare(struct device *dev) | 1834 | static int atmel_xdmac_prepare(struct device *dev) |
1835 | { | 1835 | { |
1836 | struct platform_device *pdev = to_platform_device(dev); | 1836 | struct at_xdmac *atxdmac = dev_get_drvdata(dev); |
1837 | struct at_xdmac *atxdmac = platform_get_drvdata(pdev); | ||
1838 | struct dma_chan *chan, *_chan; | 1837 | struct dma_chan *chan, *_chan; |
1839 | 1838 | ||
1840 | list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) { | 1839 | list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) { |
@@ -1853,8 +1852,7 @@ static int atmel_xdmac_prepare(struct device *dev) | |||
1853 | #ifdef CONFIG_PM_SLEEP | 1852 | #ifdef CONFIG_PM_SLEEP |
1854 | static int atmel_xdmac_suspend(struct device *dev) | 1853 | static int atmel_xdmac_suspend(struct device *dev) |
1855 | { | 1854 | { |
1856 | struct platform_device *pdev = to_platform_device(dev); | 1855 | struct at_xdmac *atxdmac = dev_get_drvdata(dev); |
1857 | struct at_xdmac *atxdmac = platform_get_drvdata(pdev); | ||
1858 | struct dma_chan *chan, *_chan; | 1856 | struct dma_chan *chan, *_chan; |
1859 | 1857 | ||
1860 | list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) { | 1858 | list_for_each_entry_safe(chan, _chan, &atxdmac->dma.channels, device_node) { |
@@ -1878,8 +1876,7 @@ static int atmel_xdmac_suspend(struct device *dev) | |||
1878 | 1876 | ||
1879 | static int atmel_xdmac_resume(struct device *dev) | 1877 | static int atmel_xdmac_resume(struct device *dev) |
1880 | { | 1878 | { |
1881 | struct platform_device *pdev = to_platform_device(dev); | 1879 | struct at_xdmac *atxdmac = dev_get_drvdata(dev); |
1882 | struct at_xdmac *atxdmac = platform_get_drvdata(pdev); | ||
1883 | struct at_xdmac_chan *atchan; | 1880 | struct at_xdmac_chan *atchan; |
1884 | struct dma_chan *chan, *_chan; | 1881 | struct dma_chan *chan, *_chan; |
1885 | int i; | 1882 | int i; |