Use the nanoseconds based interface instead of converting timespecs. Signed-off-by: Thomas Gleixner Cc: Arnd Bergmann Cc: Greg Kroah-Hartman --- drivers/char/hangcheck-timer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) Index: tip/drivers/char/hangcheck-timer.c =================================================================== --- tip.orig/drivers/char/hangcheck-timer.c +++ tip/drivers/char/hangcheck-timer.c @@ -49,7 +49,7 @@ #include #include #include -#include +#include #define VERSION_STR "0.9.1" @@ -129,9 +129,7 @@ extern unsigned long long monotonic_cloc #else static inline unsigned long long monotonic_clock(void) { - struct timespec ts; - getrawmonotonic(&ts); - return timespec_to_ns(&ts); + return ktime_get_raw_ns(); } #endif /* HAVE_MONOTONIC */ @@ -186,9 +184,9 @@ static int __init hangcheck_init(void) printk("Hangcheck: starting hangcheck timer %s (tick is %d seconds, margin is %d seconds).\n", VERSION_STR, hangcheck_tick, hangcheck_margin); #if defined (HAVE_MONOTONIC) - printk("Hangcheck: Using monotonic_clock().\n"); + printk("Hangcheck: Using monotonic clock\n"); #else - printk("Hangcheck: Using getrawmonotonic().\n"); + printk("Hangcheck: Using raw monotonic clock.\n"); #endif /* HAVE_MONOTONIC */ hangcheck_tsc_margin = (unsigned long long)(hangcheck_margin + hangcheck_tick); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/