watchdog: iTCO_wdt: Replace shutdown function with call to watchdog_stop_on_reboot
The shutdown function calls the stop function. Call watchdog_stop_on_reboot() from probe instead. 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 - Replace shutdown function with call to watchdog_stop_on_reboot() Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
parent
396164b740
commit
d3d77b5abc
|
@ -520,6 +520,7 @@ static int iTCO_wdt_probe(struct platform_device *pdev)
|
||||||
WATCHDOG_TIMEOUT);
|
WATCHDOG_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
watchdog_stop_on_reboot(&p->wddev);
|
||||||
ret = devm_watchdog_register_device(dev, &p->wddev);
|
ret = devm_watchdog_register_device(dev, &p->wddev);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
pr_err("cannot register watchdog device (err=%d)\n", ret);
|
pr_err("cannot register watchdog device (err=%d)\n", ret);
|
||||||
|
@ -543,13 +544,6 @@ static int iTCO_wdt_remove(struct platform_device *pdev)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iTCO_wdt_shutdown(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct iTCO_wdt_private *p = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
iTCO_wdt_stop(&p->wddev);
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
#ifdef CONFIG_PM_SLEEP
|
||||||
/*
|
/*
|
||||||
* Suspend-to-idle requires this, because it stops the ticks and timekeeping, so
|
* Suspend-to-idle requires this, because it stops the ticks and timekeeping, so
|
||||||
|
@ -603,7 +597,6 @@ static const struct dev_pm_ops iTCO_wdt_pm = {
|
||||||
static struct platform_driver iTCO_wdt_driver = {
|
static struct platform_driver iTCO_wdt_driver = {
|
||||||
.probe = iTCO_wdt_probe,
|
.probe = iTCO_wdt_probe,
|
||||||
.remove = iTCO_wdt_remove,
|
.remove = iTCO_wdt_remove,
|
||||||
.shutdown = iTCO_wdt_shutdown,
|
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = DRV_NAME,
|
.name = DRV_NAME,
|
||||||
.pm = ITCO_WDT_PM_OPS,
|
.pm = ITCO_WDT_PM_OPS,
|
||||||
|
|
Loading…
Reference in New Issue