--- zzzz-none-000/linux-4.1.52/drivers/watchdog/watchdog_core.c 2018-05-28 02:26:45.000000000 +0000 +++ bcm63-7530ax-731/linux-4.1.52/drivers/watchdog/watchdog_core.c 2022-03-02 11:37:13.000000000 +0000 @@ -151,7 +151,6 @@ return ret; } } - devno = wdd->cdev.dev; wdd->dev = device_create(watchdog_class, wdd->parent, devno, NULL, "watchdog%d", wdd->id); @@ -185,12 +184,22 @@ ret = watchdog_dev_unregister(wdd); if (ret) pr_err("error unregistering /dev/watchdog (err=%d)\n", ret); + device_destroy(watchdog_class, devno); ida_simple_remove(&watchdog_ida, wdd->id); wdd->dev = NULL; + } EXPORT_SYMBOL_GPL(watchdog_unregister_device); +#if defined(CONFIG_BCM_KF_WDT) +void watchdog_force_disable( void ) +{ + watchdog_dev_force_disable(); +} +EXPORT_SYMBOL_GPL(watchdog_force_disable); +#endif + static int __init watchdog_init(void) { int err;