From 9ba3943ce613c179740957e85405b4c832323ddb Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Wed, 23 Oct 2019 18:56:00 +0200 Subject: watchdog: export API to configure watchdogs by name So far watchdog users could only configure the watchdog with the highest priority. In preparation for having the wd command configure a watchdog by name, extend watchdog_set_timeout with a struct watchdog *parameter and export functions to query default watchdog and to find watchdog by name. No functional change. Signed-off-by: Ahmad Fatoum Signed-off-by: Sascha Hauer --- common/boot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common') diff --git a/common/boot.c b/common/boot.c index 14d4fe9d64..dcbe5cc2ec 100644 --- a/common/boot.c +++ b/common/boot.c @@ -146,7 +146,8 @@ int boot_entry(struct bootentry *be, int verbose, int dryrun) printf("Booting entry '%s'\n", be->title); if (IS_ENABLED(CONFIG_WATCHDOG) && boot_watchdog_timeout) { - ret = watchdog_set_timeout(boot_watchdog_timeout); + ret = watchdog_set_timeout(watchdog_get_default(), + boot_watchdog_timeout); if (ret) pr_warn("Failed to enable watchdog: %s\n", strerror(-ret)); } -- cgit v1.2.3