Commit 064c946a authored by Linus Torvalds's avatar Linus Torvalds

Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog

* git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
  watchdog: at32ap700x_wdt: register misc device last in probe() function
  watchdog: [PATCH 3/3] imx2_wdt: fix section mismatch
parents e6d13361 f1f5bda4
...@@ -346,9 +346,13 @@ static int __init at32_wdt_probe(struct platform_device *pdev) ...@@ -346,9 +346,13 @@ static int __init at32_wdt_probe(struct platform_device *pdev)
} else { } else {
wdt->users = 0; wdt->users = 0;
} }
wdt->miscdev.minor = WATCHDOG_MINOR;
wdt->miscdev.name = "watchdog"; wdt->miscdev.minor = WATCHDOG_MINOR;
wdt->miscdev.fops = &at32_wdt_fops; wdt->miscdev.name = "watchdog";
wdt->miscdev.fops = &at32_wdt_fops;
wdt->miscdev.parent = &pdev->dev;
platform_set_drvdata(pdev, wdt);
if (at32_wdt_settimeout(timeout)) { if (at32_wdt_settimeout(timeout)) {
at32_wdt_settimeout(TIMEOUT_DEFAULT); at32_wdt_settimeout(TIMEOUT_DEFAULT);
...@@ -360,17 +364,17 @@ static int __init at32_wdt_probe(struct platform_device *pdev) ...@@ -360,17 +364,17 @@ static int __init at32_wdt_probe(struct platform_device *pdev)
ret = misc_register(&wdt->miscdev); ret = misc_register(&wdt->miscdev);
if (ret) { if (ret) {
dev_dbg(&pdev->dev, "failed to register wdt miscdev\n"); dev_dbg(&pdev->dev, "failed to register wdt miscdev\n");
goto err_iounmap; goto err_register;
} }
platform_set_drvdata(pdev, wdt);
wdt->miscdev.parent = &pdev->dev;
dev_info(&pdev->dev, dev_info(&pdev->dev,
"AT32AP700X WDT at 0x%p, timeout %d sec (nowayout=%d)\n", "AT32AP700X WDT at 0x%p, timeout %d sec (nowayout=%d)\n",
wdt->regs, wdt->timeout, nowayout); wdt->regs, wdt->timeout, nowayout);
return 0; return 0;
err_register:
platform_set_drvdata(pdev, NULL);
err_iounmap: err_iounmap:
iounmap(wdt->regs); iounmap(wdt->regs);
err_free: err_free:
......
...@@ -330,7 +330,6 @@ static void imx2_wdt_shutdown(struct platform_device *pdev) ...@@ -330,7 +330,6 @@ static void imx2_wdt_shutdown(struct platform_device *pdev)
} }
static struct platform_driver imx2_wdt_driver = { static struct platform_driver imx2_wdt_driver = {
.probe = imx2_wdt_probe,
.remove = __exit_p(imx2_wdt_remove), .remove = __exit_p(imx2_wdt_remove),
.shutdown = imx2_wdt_shutdown, .shutdown = imx2_wdt_shutdown,
.driver = { .driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment