aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/lantiq/xway/dma.c5
-rw-r--r--arch/mips/lantiq/xway/gptu.c8
-rw-r--r--arch/mips/pci/pci-lantiq.c12
3 files changed, 12 insertions, 13 deletions
diff --git a/arch/mips/lantiq/xway/dma.c b/arch/mips/lantiq/xway/dma.c
index e44a1866653f..08f7ebd9c774 100644
--- a/arch/mips/lantiq/xway/dma.c
+++ b/arch/mips/lantiq/xway/dma.c
@@ -21,6 +21,7 @@
21#include <linux/dma-mapping.h> 21#include <linux/dma-mapping.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/clk.h> 23#include <linux/clk.h>
24#include <linux/err.h>
24 25
25#include <lantiq_soc.h> 26#include <lantiq_soc.h>
26#include <xway_dma.h> 27#include <xway_dma.h>
@@ -223,8 +224,8 @@ ltq_dma_init(struct platform_device *pdev)
223 panic("Failed to get dma resource"); 224 panic("Failed to get dma resource");
224 225
225 /* remap dma register range */ 226 /* remap dma register range */
226 ltq_dma_membase = devm_request_and_ioremap(&pdev->dev, res); 227 ltq_dma_membase = devm_ioremap_resource(&pdev->dev, res);
227 if (!ltq_dma_membase) 228 if (IS_ERR(ltq_dma_membase))
228 panic("Failed to remap dma resource"); 229 panic("Failed to remap dma resource");
229 230
230 /* power up and reset the dma engine */ 231 /* power up and reset the dma engine */
diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c
index e30b1ed1b936..9861c8669fab 100644
--- a/arch/mips/lantiq/xway/gptu.c
+++ b/arch/mips/lantiq/xway/gptu.c
@@ -150,11 +150,9 @@ static int gptu_probe(struct platform_device *pdev)
150 } 150 }
151 151
152 /* remap gptu register range */ 152 /* remap gptu register range */
153 gptu_membase = devm_request_and_ioremap(&pdev->dev, res); 153 gptu_membase = devm_ioremap_resource(&pdev->dev, res);
154 if (!gptu_membase) { 154 if (IS_ERR(gptu_membase))
155 dev_err(&pdev->dev, "Failed to remap resource\n"); 155 return PTR_ERR(gptu_membase);
156 return -ENOMEM;
157 }
158 156
159 /* enable our clock */ 157 /* enable our clock */
160 clk = clk_get(&pdev->dev, NULL); 158 clk = clk_get(&pdev->dev, NULL);
diff --git a/arch/mips/pci/pci-lantiq.c b/arch/mips/pci/pci-lantiq.c
index 95681789b51e..910fb4c20b9e 100644
--- a/arch/mips/pci/pci-lantiq.c
+++ b/arch/mips/pci/pci-lantiq.c
@@ -214,13 +214,13 @@ static int ltq_pci_probe(struct platform_device *pdev)
214 return -EINVAL; 214 return -EINVAL;
215 } 215 }
216 216
217 ltq_pci_membase = devm_request_and_ioremap(&pdev->dev, res_bridge); 217 ltq_pci_membase = devm_ioremap_resource(&pdev->dev, res_bridge);
218 ltq_pci_mapped_cfg = devm_request_and_ioremap(&pdev->dev, res_cfg); 218 if (IS_ERR(ltq_pci_membase))
219 return PTR_ERR(ltq_pci_membase);
219 220
220 if (!ltq_pci_membase || !ltq_pci_mapped_cfg) { 221 ltq_pci_mapped_cfg = devm_ioremap_resource(&pdev->dev, res_cfg);
221 dev_err(&pdev->dev, "failed to remap resources\n"); 222 if (IS_ERR(ltq_pci_mapped_cfg))
222 return -ENOMEM; 223 return PTR_ERR(ltq_pci_mapped_cfg);
223 }
224 224
225 ltq_pci_startup(pdev); 225 ltq_pci_startup(pdev);
226 226