diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 21:21:48 +0100 |
commit | 4c271bb67c04253c1e99006eb48fb773a8fe8c0f (patch) | |
tree | 5a05de9c0bd07e0ddc29e9312fec52c3c741d041 /drivers/watchdog/dw_wdt.c | |
parent | thermal: Convert to devm_ioremap_resource() (diff) | |
download | linux-4c271bb67c04253c1e99006eb48fb773a8fe8c0f.tar.xz linux-4c271bb67c04253c1e99006eb48fb773a8fe8c0f.zip |
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 <thierry.reding@avionic-design.de>
Cc: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/watchdog/dw_wdt.c')
-rw-r--r-- | drivers/watchdog/dw_wdt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/dw_wdt.c b/drivers/watchdog/dw_wdt.c index a0eba3c40e25..203766989382 100644 --- a/drivers/watchdog/dw_wdt.c +++ b/drivers/watchdog/dw_wdt.c @@ -301,9 +301,9 @@ static int dw_wdt_drv_probe(struct platform_device *pdev) if (!mem) return -EINVAL; - dw_wdt.regs = devm_request_and_ioremap(&pdev->dev, mem); - if (!dw_wdt.regs) - return -ENOMEM; + dw_wdt.regs = devm_ioremap_resource(&pdev->dev, mem); + if (IS_ERR(dw_wdt.regs)) + return PTR_ERR(dw_wdt.regs); dw_wdt.clk = clk_get(&pdev->dev, NULL); if (IS_ERR(dw_wdt.clk)) |