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/ar7_wdt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/watchdog/ar7_wdt.c') diff --git a/drivers/watchdog/ar7_wdt.c b/drivers/watchdog/ar7_wdt.c index 3003e2a9580b..2f3cc8fb471a 100644 --- a/drivers/watchdog/ar7_wdt.c +++ b/drivers/watchdog/ar7_wdt.c @@ -285,11 +285,9 @@ static int ar7_wdt_probe(struct platform_device *pdev) return -ENODEV; } - ar7_wdt = devm_request_and_ioremap(&pdev->dev, ar7_regs_wdt); - if (!ar7_wdt) { - pr_err("could not ioremap registers\n"); - return -ENXIO; - } + ar7_wdt = devm_ioremap_resource(&pdev->dev, ar7_regs_wdt); + if (IS_ERR(ar7_wdt)) + return PTR_ERR(ar7_wdt); vbus_clk = clk_get(NULL, "vbus"); if (IS_ERR(vbus_clk)) { -- cgit v1.2.3