diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-27 10:38:20 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-27 10:38:20 -0400 |
| commit | 064c946a0cda77057277d5758f259b54484cfc5a (patch) | |
| tree | 66e32023119cc3776a874043b7ef18c05cde32dc | |
| parent | e6d133618836f317f5a2be657f768e56552b9419 (diff) | |
| parent | f1f5bda4e9726456bd132e738bf60b727856477e (diff) | |
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
| -rw-r--r-- | drivers/watchdog/at32ap700x_wdt.c | 16 | ||||
| -rw-r--r-- | drivers/watchdog/imx2_wdt.c | 1 |
2 files changed, 10 insertions, 7 deletions
diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c index 1cddf92cb9a6..750bc5281d79 100644 --- a/drivers/watchdog/at32ap700x_wdt.c +++ b/drivers/watchdog/at32ap700x_wdt.c | |||
| @@ -346,9 +346,13 @@ static int __init at32_wdt_probe(struct platform_device *pdev) | |||
| 346 | } else { | 346 | } else { |
| 347 | wdt->users = 0; | 347 | wdt->users = 0; |
| 348 | } | 348 | } |
| 349 | wdt->miscdev.minor = WATCHDOG_MINOR; | 349 | |
| 350 | wdt->miscdev.name = "watchdog"; | 350 | wdt->miscdev.minor = WATCHDOG_MINOR; |
| 351 | wdt->miscdev.fops = &at32_wdt_fops; | 351 | wdt->miscdev.name = "watchdog"; |
| 352 | wdt->miscdev.fops = &at32_wdt_fops; | ||
| 353 | wdt->miscdev.parent = &pdev->dev; | ||
| 354 | |||
| 355 | platform_set_drvdata(pdev, wdt); | ||
| 352 | 356 | ||
| 353 | if (at32_wdt_settimeout(timeout)) { | 357 | if (at32_wdt_settimeout(timeout)) { |
| 354 | at32_wdt_settimeout(TIMEOUT_DEFAULT); | 358 | at32_wdt_settimeout(TIMEOUT_DEFAULT); |
| @@ -360,17 +364,17 @@ static int __init at32_wdt_probe(struct platform_device *pdev) | |||
| 360 | ret = misc_register(&wdt->miscdev); | 364 | ret = misc_register(&wdt->miscdev); |
| 361 | if (ret) { | 365 | if (ret) { |
| 362 | dev_dbg(&pdev->dev, "failed to register wdt miscdev\n"); | 366 | dev_dbg(&pdev->dev, "failed to register wdt miscdev\n"); |
| 363 | goto err_iounmap; | 367 | goto err_register; |
| 364 | } | 368 | } |
| 365 | 369 | ||
| 366 | platform_set_drvdata(pdev, wdt); | ||
| 367 | wdt->miscdev.parent = &pdev->dev; | ||
| 368 | dev_info(&pdev->dev, | 370 | dev_info(&pdev->dev, |
| 369 | "AT32AP700X WDT at 0x%p, timeout %d sec (nowayout=%d)\n", | 371 | "AT32AP700X WDT at 0x%p, timeout %d sec (nowayout=%d)\n", |
| 370 | wdt->regs, wdt->timeout, nowayout); | 372 | wdt->regs, wdt->timeout, nowayout); |
| 371 | 373 | ||
| 372 | return 0; | 374 | return 0; |
| 373 | 375 | ||
| 376 | err_register: | ||
| 377 | platform_set_drvdata(pdev, NULL); | ||
| 374 | err_iounmap: | 378 | err_iounmap: |
| 375 | iounmap(wdt->regs); | 379 | iounmap(wdt->regs); |
| 376 | err_free: | 380 | err_free: |
diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index ea25885781bb..2ee7dac55a3c 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c | |||
| @@ -330,7 +330,6 @@ static void imx2_wdt_shutdown(struct platform_device *pdev) | |||
| 330 | } | 330 | } |
| 331 | 331 | ||
| 332 | static struct platform_driver imx2_wdt_driver = { | 332 | static struct platform_driver imx2_wdt_driver = { |
| 333 | .probe = imx2_wdt_probe, | ||
| 334 | .remove = __exit_p(imx2_wdt_remove), | 333 | .remove = __exit_p(imx2_wdt_remove), |
| 335 | .shutdown = imx2_wdt_shutdown, | 334 | .shutdown = imx2_wdt_shutdown, |
| 336 | .driver = { | 335 | .driver = { |
