diff options
author | Tushar Behera <tushar.behera@linaro.org> | 2013-06-17 05:16:13 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-08-06 14:07:09 -0400 |
commit | f48fbf9c7e892d1b070affb273970d948b825939 (patch) | |
tree | de139371592640447967d4ac5bcc2b45d18cc963 | |
parent | ce1be10bf6dc8406ae773f0ac6265585a4154d37 (diff) |
PCI: mvebu: Convert to use devm_ioremap_resource
Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().
While at it, modify mvebu_pcie_map_registers() to propagate error code.
Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
-rw-r--r-- | drivers/pci/host/pci-mvebu.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 13a633b1612e..8fc2a8241fa8 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c | |||
@@ -750,9 +750,9 @@ mvebu_pcie_map_registers(struct platform_device *pdev, | |||
750 | 750 | ||
751 | ret = of_address_to_resource(np, 0, ®s); | 751 | ret = of_address_to_resource(np, 0, ®s); |
752 | if (ret) | 752 | if (ret) |
753 | return NULL; | 753 | return ERR_PTR(ret); |
754 | 754 | ||
755 | return devm_request_and_ioremap(&pdev->dev, ®s); | 755 | return devm_ioremap_resource(&pdev->dev, ®s); |
756 | } | 756 | } |
757 | 757 | ||
758 | static int __init mvebu_pcie_probe(struct platform_device *pdev) | 758 | static int __init mvebu_pcie_probe(struct platform_device *pdev) |
@@ -842,9 +842,10 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev) | |||
842 | continue; | 842 | continue; |
843 | 843 | ||
844 | port->base = mvebu_pcie_map_registers(pdev, child, port); | 844 | port->base = mvebu_pcie_map_registers(pdev, child, port); |
845 | if (!port->base) { | 845 | if (IS_ERR(port->base)) { |
846 | dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n", | 846 | dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n", |
847 | port->port, port->lane); | 847 | port->port, port->lane); |
848 | port->base = NULL; | ||
848 | continue; | 849 | continue; |
849 | } | 850 | } |
850 | 851 | ||