aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pci
diff options
context:
space:
mode:
authorSilviu-Mihai Popescu <silviupopescu1990@gmail.com>2013-03-12 06:30:05 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-05-07 19:19:07 -0400
commitf560fabdf3f3fe12bd48146a6ccdf03ddf9ab12c (patch)
tree4f3d0c50732a107a36a6e02240b7d2f9cec4d83b /arch/mips/pci
parent301896513971d41d737c904ecf267b6f0ea21d55 (diff)
MIPS: pci: convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com> Patchwork: http://patchwork.linux-mips.org/patch/4986/ Acked-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'arch/mips/pci')
-rw-r--r--arch/mips/pci/pci-ar71xx.c6
-rw-r--r--arch/mips/pci/pci-ar724x.c18
2 files changed, 12 insertions, 12 deletions
diff --git a/arch/mips/pci/pci-ar71xx.c b/arch/mips/pci/pci-ar71xx.c
index 412ec025cf55..18517dd0f709 100644
--- a/arch/mips/pci/pci-ar71xx.c
+++ b/arch/mips/pci/pci-ar71xx.c
@@ -366,9 +366,9 @@ static int ar71xx_pci_probe(struct platform_device *pdev)
366 if (!res) 366 if (!res)
367 return -EINVAL; 367 return -EINVAL;
368 368
369 apc->cfg_base = devm_request_and_ioremap(&pdev->dev, res); 369 apc->cfg_base = devm_ioremap_resource(&pdev->dev, res);
370 if (!apc->cfg_base) 370 if (IS_ERR(apc->cfg_base))
371 return -ENOMEM; 371 return PTR_ERR(apc->cfg_base);
372 372
373 apc->irq = platform_get_irq(pdev, 0); 373 apc->irq = platform_get_irq(pdev, 0);
374 if (apc->irq < 0) 374 if (apc->irq < 0)
diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c
index 8a0700d448fe..65ec032fa0b4 100644
--- a/arch/mips/pci/pci-ar724x.c
+++ b/arch/mips/pci/pci-ar724x.c
@@ -365,25 +365,25 @@ static int ar724x_pci_probe(struct platform_device *pdev)
365 if (!res) 365 if (!res)
366 return -EINVAL; 366 return -EINVAL;
367 367
368 apc->ctrl_base = devm_request_and_ioremap(&pdev->dev, res); 368 apc->ctrl_base = devm_ioremap_resource(&pdev->dev, res);
369 if (apc->ctrl_base == NULL) 369 if (IS_ERR(apc->ctrl_base))
370 return -EBUSY; 370 return PTR_ERR(apc->ctrl_base);
371 371
372 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg_base"); 372 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cfg_base");
373 if (!res) 373 if (!res)
374 return -EINVAL; 374 return -EINVAL;
375 375
376 apc->devcfg_base = devm_request_and_ioremap(&pdev->dev, res); 376 apc->devcfg_base = devm_ioremap_resource(&pdev->dev, res);
377 if (!apc->devcfg_base) 377 if (IS_ERR(apc->devcfg_base))
378 return -EBUSY; 378 return PTR_ERR(apc->devcfg_base);
379 379
380 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "crp_base"); 380 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "crp_base");
381 if (!res) 381 if (!res)
382 return -EINVAL; 382 return -EINVAL;
383 383
384 apc->crp_base = devm_request_and_ioremap(&pdev->dev, res); 384 apc->crp_base = devm_ioremap_resource(&pdev->dev, res);
385 if (apc->crp_base == NULL) 385 if (IS_ERR(apc->crp_base))
386 return -EBUSY; 386 return PTR_ERR(apc->crp_base);
387 387
388 apc->irq = platform_get_irq(pdev, 0); 388 apc->irq = platform_get_irq(pdev, 0);
389 if (apc->irq < 0) 389 if (apc->irq < 0)