]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.1/watchdog-fix-compile-time-error-of-pretimeout-govern.patch
fixes for 5.1
[thirdparty/kernel/stable-queue.git] / queue-5.1 / watchdog-fix-compile-time-error-of-pretimeout-govern.patch
1 From 42de1ee1ab8a8b50e75f6b1fa5ac18b1e91372d2 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 1d3b4bfbbc4d..d4d6c5b2bef3 100644
38 --- a/drivers/watchdog/Kconfig
39 +++ b/drivers/watchdog/Kconfig
40 @@ -2028,6 +2028,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