diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2018-04-19 10:05:39 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2018-04-22 02:18:44 -0400 |
commit | 6af6c3710759d875a5abafd7900e2a5f62a7c095 (patch) | |
tree | b4d3696ed5f8159024eb7fa7c3bc1bd9c5bc4f28 | |
parent | 60cc43fc888428bb2f18f08997432d426a243338 (diff) |
dmaengine: qcom: 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>
Reviewed-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r-- | drivers/dma/qcom/hidma.c | 3 | ||||
-rw-r--r-- | drivers/dma/qcom/hidma_mgmt_sys.c | 6 |
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 963cc5228d05..43d4b00b8138 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c | |||
@@ -616,8 +616,7 @@ static irqreturn_t hidma_chirq_handler_msi(int chirq, void *arg) | |||
616 | static ssize_t hidma_show_values(struct device *dev, | 616 | static ssize_t hidma_show_values(struct device *dev, |
617 | struct device_attribute *attr, char *buf) | 617 | struct device_attribute *attr, char *buf) |
618 | { | 618 | { |
619 | struct platform_device *pdev = to_platform_device(dev); | 619 | struct hidma_dev *mdev = dev_get_drvdata(dev); |
620 | struct hidma_dev *mdev = platform_get_drvdata(pdev); | ||
621 | 620 | ||
622 | buf[0] = 0; | 621 | buf[0] = 0; |
623 | 622 | ||
diff --git a/drivers/dma/qcom/hidma_mgmt_sys.c b/drivers/dma/qcom/hidma_mgmt_sys.c index d61f1068a34b..cbb89eafd844 100644 --- a/drivers/dma/qcom/hidma_mgmt_sys.c +++ b/drivers/dma/qcom/hidma_mgmt_sys.c | |||
@@ -107,8 +107,7 @@ static struct hidma_mgmt_fileinfo hidma_mgmt_files[] = { | |||
107 | static ssize_t show_values(struct device *dev, struct device_attribute *attr, | 107 | static ssize_t show_values(struct device *dev, struct device_attribute *attr, |
108 | char *buf) | 108 | char *buf) |
109 | { | 109 | { |
110 | struct platform_device *pdev = to_platform_device(dev); | 110 | struct hidma_mgmt_dev *mdev = dev_get_drvdata(dev); |
111 | struct hidma_mgmt_dev *mdev = platform_get_drvdata(pdev); | ||
112 | unsigned int i; | 111 | unsigned int i; |
113 | 112 | ||
114 | buf[0] = 0; | 113 | buf[0] = 0; |
@@ -125,8 +124,7 @@ static ssize_t show_values(struct device *dev, struct device_attribute *attr, | |||
125 | static ssize_t set_values(struct device *dev, struct device_attribute *attr, | 124 | static ssize_t set_values(struct device *dev, struct device_attribute *attr, |
126 | const char *buf, size_t count) | 125 | const char *buf, size_t count) |
127 | { | 126 | { |
128 | struct platform_device *pdev = to_platform_device(dev); | 127 | struct hidma_mgmt_dev *mdev = dev_get_drvdata(dev); |
129 | struct hidma_mgmt_dev *mdev = platform_get_drvdata(pdev); | ||
130 | unsigned long tmp; | 128 | unsigned long tmp; |
131 | unsigned int i; | 129 | unsigned int i; |
132 | int rc; | 130 | int rc; |