Commit 77d9f766fe36f902125f84a1c901fa72d2157359

Authored by Guenter Roeck
Committed by Wim Van Sebroeck
1 parent 3564fbc54f

watchdog: iTCO_wdt: Various improvements

Various coccinelle driven transformations as detailed below.

The conversion was done automatically with coccinelle using the
following semantic patches. The semantic patches and the scripts
used to generate this commit log are available at
https://github.com/groeck/coccinelle-patches

- Use watchdog_stop_on_unregister to stop the watchdog on remove
- Drop assignments to otherwise unused variables
- Drop empty remove function

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>

Showing 1 changed file with 1 additions and 12 deletions Side-by-side Diff

drivers/watchdog/iTCO_wdt.c
... ... @@ -545,6 +545,7 @@
545 545 }
546 546  
547 547 watchdog_stop_on_reboot(&p->wddev);
  548 + watchdog_stop_on_unregister(&p->wddev);
548 549 ret = devm_watchdog_register_device(dev, &p->wddev);
549 550 if (ret != 0) {
550 551 pr_err("cannot register watchdog device (err=%d)\n", ret);
... ... @@ -557,17 +558,6 @@
557 558 return 0;
558 559 }
559 560  
560   -static int iTCO_wdt_remove(struct platform_device *pdev)
561   -{
562   - struct iTCO_wdt_private *p = platform_get_drvdata(pdev);
563   -
564   - /* Stop the timer before we leave */
565   - if (!nowayout)
566   - iTCO_wdt_stop(&p->wddev);
567   -
568   - return 0;
569   -}
570   -
571 561 #ifdef CONFIG_PM_SLEEP
572 562 /*
573 563 * Suspend-to-idle requires this, because it stops the ticks and timekeeping, so
... ... @@ -620,7 +610,6 @@
620 610  
621 611 static struct platform_driver iTCO_wdt_driver = {
622 612 .probe = iTCO_wdt_probe,
623   - .remove = iTCO_wdt_remove,
624 613 .driver = {
625 614 .name = DRV_NAME,
626 615 .pm = ITCO_WDT_PM_OPS,