diff options
Diffstat (limited to 'drivers/watchdog/imx2_wdt.c')
-rw-r--r-- | drivers/watchdog/imx2_wdt.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index 9a45d0294cf4..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) | |||
262 | return -ENODEV; | 262 | return -ENODEV; |
263 | } | 263 | } |
264 | 264 | ||
265 | imx2_wdt.base = devm_request_and_ioremap(&pdev->dev, res); | 265 | imx2_wdt.base = devm_ioremap_resource(&pdev->dev, res); |
266 | if (!imx2_wdt.base) { | 266 | if (IS_ERR(imx2_wdt.base)) |
267 | dev_err(&pdev->dev, "ioremap failed\n"); | 267 | return PTR_ERR(imx2_wdt.base); |
268 | return -ENOMEM; | ||
269 | } | ||
270 | 268 | ||
271 | imx2_wdt.clk = clk_get(&pdev->dev, NULL); | 269 | imx2_wdt.clk = clk_get(&pdev->dev, NULL); |
272 | if (IS_ERR(imx2_wdt.clk)) { | 270 | if (IS_ERR(imx2_wdt.clk)) { |
@@ -342,17 +340,7 @@ static struct platform_driver imx2_wdt_driver = { | |||
342 | }, | 340 | }, |
343 | }; | 341 | }; |
344 | 342 | ||
345 | static int __init imx2_wdt_init(void) | 343 | module_platform_driver_probe(imx2_wdt_driver, imx2_wdt_probe); |
346 | { | ||
347 | return platform_driver_probe(&imx2_wdt_driver, imx2_wdt_probe); | ||
348 | } | ||
349 | module_init(imx2_wdt_init); | ||
350 | |||
351 | static void __exit imx2_wdt_exit(void) | ||
352 | { | ||
353 | platform_driver_unregister(&imx2_wdt_driver); | ||
354 | } | ||
355 | module_exit(imx2_wdt_exit); | ||
356 | 344 | ||
357 | MODULE_AUTHOR("Wolfram Sang"); | 345 | MODULE_AUTHOR("Wolfram Sang"); |
358 | MODULE_DESCRIPTION("Watchdog driver for IMX2 and later"); | 346 | MODULE_DESCRIPTION("Watchdog driver for IMX2 and later"); |