]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/input/joystick/analog.c
x86/cpufeature: Replace cpu_has_tsc with boot_cpu_has() usage
[mirror_ubuntu-artful-kernel.git] / drivers / input / joystick / analog.c
index 6f8b084e13d0724e77c68c249a227fdb6377a02d..3d8ff09eba57696677b242d29e33fb1bac3f592d 100644 (file)
@@ -143,9 +143,9 @@ struct analog_port {
 
 #include <linux/i8253.h>
 
-#define GET_TIME(x)    do { if (cpu_has_tsc) x = (unsigned int)rdtsc(); else x = get_time_pit(); } while (0)
-#define DELTA(x,y)     (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? PIT_TICK_RATE / HZ : 0)))
-#define TIME_NAME      (cpu_has_tsc?"TSC":"PIT")
+#define GET_TIME(x)    do { if (boot_cpu_has(X86_FEATURE_TSC)) x = (unsigned int)rdtsc(); else x = get_time_pit(); } while (0)
+#define DELTA(x,y)     (boot_cpu_has(X86_FEATURE_TSC) ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? PIT_TICK_RATE / HZ : 0)))
+#define TIME_NAME      (boot_cpu_has(X86_FEATURE_TSC)?"TSC":"PIT")
 static unsigned int get_time_pit(void)
 {
         unsigned long flags;