From 4c271bb67c04253c1e99006eb48fb773a8fe8c0f Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:25 +0100 Subject: watchdog: 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 Cc: Wim Van Sebroeck Signed-off-by: Greg Kroah-Hartman --- drivers/watchdog/lantiq_wdt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/watchdog/lantiq_wdt.c') diff --git a/drivers/watchdog/lantiq_wdt.c b/drivers/watchdog/lantiq_wdt.c index 79fe01b42339..088fd0c9d888 100644 --- a/drivers/watchdog/lantiq_wdt.c +++ b/drivers/watchdog/lantiq_wdt.c @@ -197,11 +197,9 @@ ltq_wdt_probe(struct platform_device *pdev) return -ENOENT; } - ltq_wdt_membase = devm_request_and_ioremap(&pdev->dev, res); - if (!ltq_wdt_membase) { - dev_err(&pdev->dev, "cannot remap I/O memory region\n"); - return -ENOMEM; - } + ltq_wdt_membase = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(ltq_wdt_membase)) + return PTR_ERR(ltq_wdt_membase); /* we do not need to enable the clock as it is always running */ clk = clk_get_io(); -- cgit v1.2.3