kselftests: timers: freq-step: Define ADJ_SETOFFSET if device has older kernel headers
authorJohn Stultz <john.stultz@linaro.org>
Mon, 14 Aug 2017 20:46:32 +0000 (13:46 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Thu, 17 Aug 2017 19:14:42 +0000 (12:14 -0700)
On some systems, the kernel headers haven't been updated to include
ADJ_SETOFFSET, so define it in the test if needed.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Stephen Boyd <stephen.boyd@linaro.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: linux-kselftest@vger.kernel.org
Signed-off-by: John Stultz <john.stultz@linaro.org>
tools/testing/selftests/timers/freq-step.c

index e8c61830825a4ba1fedc9b4949561f5c61b185a5..934a308ee686db2e2faea1f0c75ddb9f508c0d64 100644 (file)
 #define MAX_FREQ_ERROR 10e-6
 #define MAX_STDDEV 1000e-9
 
+#ifndef ADJ_SETOFFSET
+  #define ADJ_SETOFFSET 0x0100
+#endif
+
 struct sample {
        double offset;
        double time;