--- zzzz-none-000/linux-4.1.52/drivers/watchdog/watchdog_dev.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/drivers/watchdog/watchdog_dev.c 2022-03-02 11:37:13.000000000 +0000 @@ -479,7 +479,11 @@ if (err < 0) { mutex_lock(&wdd->lock); if (!test_bit(WDOG_UNREGISTERED, &wdd->status)) +#if defined(CONFIG_BCM_KF_WDT) + dev_dbg(wdd->dev, "watchdog did not stop!\n"); +#else dev_crit(wdd->dev, "watchdog did not stop!\n"); +#endif mutex_unlock(&wdd->lock); watchdog_ping(wdd); } @@ -571,6 +575,7 @@ mutex_unlock(&watchdog->lock); cdev_del(&watchdog->cdev); + if (watchdog->id == 0) { misc_deregister(&watchdog_miscdev); old_wdd = NULL; @@ -578,6 +583,17 @@ return 0; } +#if defined(CONFIG_BCM_KF_WDT) +int watchdog_dev_force_disable( void ) +{ + if( old_wdd ) + { + watchdog_stop(old_wdd); + } + return 0; +} +#endif + /* * watchdog_dev_init: init dev part of watchdog core *