diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:08:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 15:21:45 -0500 |
commit | 7c390a7e956b4bf7b7d6dba4dfb93299c4f0879a (patch) | |
tree | b7ea5ba40b42106a5f3106ff55e576b083f14bf6 /arch/mips/pci | |
parent | 5857bd98dbd0080e6b27b51087cc9ec24f426e8b (diff) |
MIPS: 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.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/mips/pci')
-rw-r--r-- | arch/mips/pci/pci-lantiq.c | 12 |
1 files changed, 6 insertions, 6 deletions
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 | ||