aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/dma/dw_dmac.c7
-rw-r--r--drivers/dma/imx-dma.c7
-rw-r--r--drivers/dma/mmp_pdma.c7
-rw-r--r--drivers/dma/mmp_tdma.c7
-rw-r--r--drivers/dma/tegra20-apb-dma.c10
5 files changed, 20 insertions, 18 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 3e8ba02ba292..b33d1f6e1333 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -14,6 +14,7 @@
14#include <linux/delay.h> 14#include <linux/delay.h>
15#include <linux/dmaengine.h> 15#include <linux/dmaengine.h>
16#include <linux/dma-mapping.h> 16#include <linux/dma-mapping.h>
17#include <linux/err.h>
17#include <linux/init.h> 18#include <linux/init.h>
18#include <linux/interrupt.h> 19#include <linux/interrupt.h>
19#include <linux/io.h> 20#include <linux/io.h>
@@ -1489,9 +1490,9 @@ static int dw_probe(struct platform_device *pdev)
1489 if (irq < 0) 1490 if (irq < 0)
1490 return irq; 1491 return irq;
1491 1492
1492 regs = devm_request_and_ioremap(&pdev->dev, io); 1493 regs = devm_ioremap_resource(&pdev->dev, io);
1493 if (!regs) 1494 if (IS_ERR(regs))
1494 return -EBUSY; 1495 return PTR_ERR(regs);
1495 1496
1496 dw_params = dma_read_byaddr(regs, DW_PARAMS); 1497 dw_params = dma_read_byaddr(regs, DW_PARAMS);
1497 autocfg = dw_params >> DW_PARAMS_EN & 0x1; 1498 autocfg = dw_params >> DW_PARAMS_EN & 0x1;
diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index dbf0e6f8de8a..84ae49101407 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -14,6 +14,7 @@
14 * http://www.opensource.org/licenses/gpl-license.html 14 * http://www.opensource.org/licenses/gpl-license.html
15 * http://www.gnu.org/copyleft/gpl.html 15 * http://www.gnu.org/copyleft/gpl.html
16 */ 16 */
17#include <linux/err.h>
17#include <linux/init.h> 18#include <linux/init.h>
18#include <linux/types.h> 19#include <linux/types.h>
19#include <linux/mm.h> 20#include <linux/mm.h>
@@ -1011,9 +1012,9 @@ static int __init imxdma_probe(struct platform_device *pdev)
1011 imxdma->devtype = pdev->id_entry->driver_data; 1012 imxdma->devtype = pdev->id_entry->driver_data;
1012 1013
1013 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1014 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1014 imxdma->base = devm_request_and_ioremap(&pdev->dev, res); 1015 imxdma->base = devm_ioremap_resource(&pdev->dev, res);
1015 if (!imxdma->base) 1016 if (IS_ERR(imxdma->base))
1016 return -EADDRNOTAVAIL; 1017 return PTR_ERR(imxdma->base);
1017 1018
1018 irq = platform_get_irq(pdev, 0); 1019 irq = platform_get_irq(pdev, 0);
1019 if (irq < 0) 1020 if (irq < 0)
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c
index c6d98c00f05c..dc7466563507 100644
--- a/drivers/dma/mmp_pdma.c
+++ b/drivers/dma/mmp_pdma.c
@@ -5,6 +5,7 @@
5 * it under the terms of the GNU General Public License version 2 as 5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation. 6 * published by the Free Software Foundation.
7 */ 7 */
8#include <linux/err.h>
8#include <linux/module.h> 9#include <linux/module.h>
9#include <linux/init.h> 10#include <linux/init.h>
10#include <linux/types.h> 11#include <linux/types.h>
@@ -782,9 +783,9 @@ static int mmp_pdma_probe(struct platform_device *op)
782 if (!iores) 783 if (!iores)
783 return -EINVAL; 784 return -EINVAL;
784 785
785 pdev->base = devm_request_and_ioremap(pdev->dev, iores); 786 pdev->base = devm_ioremap_resource(pdev->dev, iores);
786 if (!pdev->base) 787 if (IS_ERR(pdev->base))
787 return -EADDRNOTAVAIL; 788 return PTR_ERR(pdev->base);
788 789
789 of_id = of_match_device(mmp_pdma_dt_ids, pdev->dev); 790 of_id = of_match_device(mmp_pdma_dt_ids, pdev->dev);
790 if (of_id) 791 if (of_id)
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index a9f1cd56689c..43d5a6c33297 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -9,6 +9,7 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/err.h>
12#include <linux/module.h> 13#include <linux/module.h>
13#include <linux/init.h> 14#include <linux/init.h>
14#include <linux/types.h> 15#include <linux/types.h>
@@ -547,9 +548,9 @@ static int mmp_tdma_probe(struct platform_device *pdev)
547 if (!iores) 548 if (!iores)
548 return -EINVAL; 549 return -EINVAL;
549 550
550 tdev->base = devm_request_and_ioremap(&pdev->dev, iores); 551 tdev->base = devm_ioremap_resource(&pdev->dev, iores);
551 if (!tdev->base) 552 if (IS_ERR(tdev->base))
552 return -EADDRNOTAVAIL; 553 return PTR_ERR(tdev->base);
553 554
554 INIT_LIST_HEAD(&tdev->device.channels); 555 INIT_LIST_HEAD(&tdev->device.channels);
555 556
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index c39e61bc8172..7d6d8b4679e9 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -21,6 +21,7 @@
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/dmaengine.h> 22#include <linux/dmaengine.h>
23#include <linux/dma-mapping.h> 23#include <linux/dma-mapping.h>
24#include <linux/err.h>
24#include <linux/init.h> 25#include <linux/init.h>
25#include <linux/interrupt.h> 26#include <linux/interrupt.h>
26#include <linux/io.h> 27#include <linux/io.h>
@@ -1236,12 +1237,9 @@ static int tegra_dma_probe(struct platform_device *pdev)
1236 return -EINVAL; 1237 return -EINVAL;
1237 } 1238 }
1238 1239
1239 tdma->base_addr = devm_request_and_ioremap(&pdev->dev, res); 1240 tdma->base_addr = devm_ioremap_resource(&pdev->dev, res);
1240 if (!tdma->base_addr) { 1241 if (IS_ERR(tdma->base_addr))
1241 dev_err(&pdev->dev, 1242 return PTR_ERR(tdma->base_addr);
1242 "Cannot request memregion/iomap dma address\n");
1243 return -EADDRNOTAVAIL;
1244 }
1245 1243
1246 tdma->dma_clk = devm_clk_get(&pdev->dev, NULL); 1244 tdma->dma_clk = devm_clk_get(&pdev->dev, NULL);
1247 if (IS_ERR(tdma->dma_clk)) { 1245 if (IS_ERR(tdma->dma_clk)) {