7af35ab87e9bf907dd36efe74d6ed796352fd964
[openwrt/staging/dangole.git] /
1 From fba2153a200716c1fec1eafda7356bb347589efb Mon Sep 17 00:00:00 2001
2 From: Randy Dunlap <rdunlap@infradead.org>
3 Date: Thu, 25 Nov 2021 18:33:16 -0800
4 Subject: [PATCH] hv: utils: add PTP_1588_CLOCK to Kconfig to fix build
5
6 The hyperv utilities use PTP clock interfaces and should depend a
7 a kconfig symbol such that they will be built as a loadable module or
8 builtin so that linker errors do not happen.
9
10 Prevents these build errors:
11
12 ld: drivers/hv/hv_util.o: in function `hv_timesync_deinit':
13 hv_util.c:(.text+0x37d): undefined reference to `ptp_clock_unregister'
14 ld: drivers/hv/hv_util.o: in function `hv_timesync_init':
15 hv_util.c:(.text+0x738): undefined reference to `ptp_clock_register'
16
17 References: https://lore.kernel.org/stable/20220328093115.7486-1-ynezz@true.cz/T/#u
18 Fixes: 3716a49a81ba ("hv_utils: implement Hyper-V PTP source")
19 Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
20 Reported-by: kernel test robot <lkp@intel.com>
21 Cc: Arnd Bergmann <arnd@arndb.de>
22 Cc: "K. Y. Srinivasan" <kys@microsoft.com>
23 Cc: Haiyang Zhang <haiyangz@microsoft.com>
24 Cc: Stephen Hemminger <sthemmin@microsoft.com>
25 Cc: Wei Liu <wei.liu@kernel.org>
26 Cc: Dexuan Cui <decui@microsoft.com>
27 Cc: linux-hyperv@vger.kernel.org
28 Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
29 Reviewed-by: Michael Kelley <mikelley@microsoft.com>
30 Link: https://lore.kernel.org/r/20211126023316.25184-1-rdunlap@infradead.org
31 Signed-off-by: Wei Liu <wei.liu@kernel.org>
32 (cherry picked from commit 1dc2f2b81a6a9895da59f3915760f6c0c3074492)
33 ---
34 drivers/hv/Kconfig | 1 +
35 1 file changed, 1 insertion(+)
36
37 --- a/drivers/hv/Kconfig
38 +++ b/drivers/hv/Kconfig
39 @@ -18,6 +18,7 @@ config HYPERV_TIMER
40 config HYPERV_UTILS
41 tristate "Microsoft Hyper-V Utilities driver"
42 depends on HYPERV && CONNECTOR && NLS
43 + depends on PTP_1588_CLOCK_OPTIONAL
44 help
45 Select this option to enable the Hyper-V Utilities.
46