]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.19/watchdog-fix-compile-time-error-of-pretimeout-govern.patch
Linux 5.1.10
[thirdparty/kernel/stable-queue.git] / queue-4.19 / watchdog-fix-compile-time-error-of-pretimeout-govern.patch
1 From 1a6e3f68ccfc317d3290f3b2bb64ae2adf790748 Mon Sep 17 00:00:00 2001
2 From: Vladimir Zapolskiy <vz@mleia.com>
3 Date: Tue, 12 Mar 2019 01:54:25 +0200
4 Subject: watchdog: fix compile time error of pretimeout governors
5
6 [ Upstream commit a223770bfa7b6647f3a70983257bd89f9cafce46 ]
7
8 CONFIG_WATCHDOG_PRETIMEOUT_GOV build symbol adds watchdog_pretimeout.o
9 object to watchdog.o, the latter is compiled only if CONFIG_WATCHDOG_CORE
10 is selected, so it rightfully makes sense to add it as a dependency.
11
12 The change fixes the next compilation errors, if CONFIG_WATCHDOG_CORE=n
13 and CONFIG_WATCHDOG_PRETIMEOUT_GOV=y are selected:
14
15 drivers/watchdog/pretimeout_noop.o: In function `watchdog_gov_noop_register':
16 drivers/watchdog/pretimeout_noop.c:35: undefined reference to `watchdog_register_governor'
17 drivers/watchdog/pretimeout_noop.o: In function `watchdog_gov_noop_unregister':
18 drivers/watchdog/pretimeout_noop.c:40: undefined reference to `watchdog_unregister_governor'
19
20 drivers/watchdog/pretimeout_panic.o: In function `watchdog_gov_panic_register':
21 drivers/watchdog/pretimeout_panic.c:35: undefined reference to `watchdog_register_governor'
22 drivers/watchdog/pretimeout_panic.o: In function `watchdog_gov_panic_unregister':
23 drivers/watchdog/pretimeout_panic.c:40: undefined reference to `watchdog_unregister_governor'
24
25 Reported-by: Kuo, Hsuan-Chi <hckuo2@illinois.edu>
26 Fixes: ff84136cb6a4 ("watchdog: add watchdog pretimeout governor framework")
27 Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
28 Reviewed-by: Guenter Roeck <linux@roeck-us.net>
29 Signed-off-by: Guenter Roeck <linux@roeck-us.net>
30 Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
31 Signed-off-by: Sasha Levin <sashal@kernel.org>
32 ---
33 drivers/watchdog/Kconfig | 1 +
34 1 file changed, 1 insertion(+)
35
36 diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
37 index 8c9ea3cd9c60..b7914eb6a04b 100644
38 --- a/drivers/watchdog/Kconfig
39 +++ b/drivers/watchdog/Kconfig
40 @@ -1967,6 +1967,7 @@ comment "Watchdog Pretimeout Governors"
41
42 config WATCHDOG_PRETIMEOUT_GOV
43 bool "Enable watchdog pretimeout governors"
44 + depends on WATCHDOG_CORE
45 help
46 The option allows to select watchdog pretimeout governors.
47
48 --
49 2.20.1
50