ntp: Fix prototype in the !CONFIG_GENERIC_CMOS_UPDATE case
authorIngo Molnar <mingo@kernel.org>
Sat, 12 Dec 2020 17:29:20 +0000 (18:29 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 13 Dec 2020 09:16:31 +0000 (10:16 +0100)
In the !CONFIG_GENERIC_CMOS_UPDATE case the update_persistent_clock64() function
gets defined as a stub in ntp.c - make the prototype in <linux/timekeeping.h>
conditional on CONFIG_GENERIC_CMOS_UPDATE as well.

Fixes: 76e87d96b30b5 ("ntp: Consolidate the RTC update implementation")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/timekeeping.h

index 7f7e4a3..929d3f3 100644 (file)
@@ -303,6 +303,8 @@ extern int persistent_clock_is_local;
 extern void read_persistent_clock64(struct timespec64 *ts);
 void read_persistent_wall_and_boot_offset(struct timespec64 *wall_clock,
                                          struct timespec64 *boot_offset);
+#ifdef CONFIG_GENERIC_CMOS_UPDATE
 extern int update_persistent_clock64(struct timespec64 now);
+#endif
 
 #endif