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/imx2_wdt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/watchdog/imx2_wdt.c') diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index bc17decc8551..ff908823688c 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c @@ -262,11 +262,9 @@ static int __init imx2_wdt_probe(struct platform_device *pdev) return -ENODEV; } - imx2_wdt.base = devm_request_and_ioremap(&pdev->dev, res); - if (!imx2_wdt.base) { - dev_err(&pdev->dev, "ioremap failed\n"); - return -ENOMEM; - } + imx2_wdt.base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(imx2_wdt.base)) + return PTR_ERR(imx2_wdt.base); imx2_wdt.clk = clk_get(&pdev->dev, NULL); if (IS_ERR(imx2_wdt.clk)) { -- cgit v1.2.3