--- zzzz-none-000/linux-4.1.38/drivers/watchdog/watchdog_core.c 2017-01-18 18:48:06.000000000 +0000 +++ bcm63-7582-715/linux-4.1.38/drivers/watchdog/watchdog_core.c 2020-11-25 10:06:48.000000000 +0000 @@ -151,7 +151,9 @@ return ret; } } - +#if defined(CONFIG_BCM_KF_WDT) + (void)devno; +#else devno = wdd->cdev.dev; wdd->dev = device_create(watchdog_class, wdd->parent, devno, NULL, "watchdog%d", wdd->id); @@ -161,6 +163,7 @@ ret = PTR_ERR(wdd->dev); return ret; } +#endif return 0; } @@ -185,12 +188,26 @@ ret = watchdog_dev_unregister(wdd); if (ret) pr_err("error unregistering /dev/watchdog (err=%d)\n", ret); + +#if defined(CONFIG_BCM_KF_WDT) + (void)devno; +#else device_destroy(watchdog_class, devno); ida_simple_remove(&watchdog_ida, wdd->id); wdd->dev = NULL; +#endif + } 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;