summaryrefslogtreecommitdiffstats
path: root/arch/mips/lantiq/xway/gptu.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 11:08:56 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-25 12:21:45 -0800
commit7c390a7e956b4bf7b7d6dba4dfb93299c4f0879a (patch)
treeb7ea5ba40b42106a5f3106ff55e576b083f14bf6 /arch/mips/lantiq/xway/gptu.c
parent5857bd98dbd0080e6b27b51087cc9ec24f426e8b (diff)
downloadop-kernel-dev-7c390a7e956b4bf7b7d6dba4dfb93299c4f0879a.zip
op-kernel-dev-7c390a7e956b4bf7b7d6dba4dfb93299c4f0879a.tar.gz
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/lantiq/xway/gptu.c')
-rw-r--r--arch/mips/lantiq/xway/gptu.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c
index e30b1ed..9861c86 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)
}
/* remap gptu register range */
- gptu_membase = devm_request_and_ioremap(&pdev->dev, res);
- if (!gptu_membase) {
- dev_err(&pdev->dev, "Failed to remap resource\n");
- return -ENOMEM;
- }
+ gptu_membase = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(gptu_membase))
+ return PTR_ERR(gptu_membase);
/* enable our clock */
clk = clk_get(&pdev->dev, NULL);
OpenPOWER on IntegriCloud