Commit f2d6fdbf authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Ingo Molnar

Input: Evdev - unify MONOTONIC and BOOTTIME clock behavior

Now that the MONOTONIC and BOOTTIME clocks are indentical, remove all the
special casing.

The user space visible interfaces still support both clocks, but their behavior
is identical.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Kevin Easton <kevin@guarana.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mark Salyzyn <salyzyn@android.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-input@vger.kernel.org
Link: http://lkml.kernel.org/r/20180301165150.155899327@linutronix.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent d6ed449a
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
enum evdev_clock_type { enum evdev_clock_type {
EV_CLK_REAL = 0, EV_CLK_REAL = 0,
EV_CLK_MONO, EV_CLK_MONO,
EV_CLK_BOOT,
EV_CLK_MAX EV_CLK_MAX
}; };
...@@ -198,12 +197,10 @@ static int evdev_set_clk_type(struct evdev_client *client, unsigned int clkid) ...@@ -198,12 +197,10 @@ static int evdev_set_clk_type(struct evdev_client *client, unsigned int clkid)
case CLOCK_REALTIME: case CLOCK_REALTIME:
clk_type = EV_CLK_REAL; clk_type = EV_CLK_REAL;
break; break;
case CLOCK_BOOTTIME:
case CLOCK_MONOTONIC: case CLOCK_MONOTONIC:
clk_type = EV_CLK_MONO; clk_type = EV_CLK_MONO;
break; break;
case CLOCK_BOOTTIME:
clk_type = EV_CLK_BOOT;
break;
default: default:
return -EINVAL; return -EINVAL;
} }
...@@ -314,8 +311,6 @@ static void evdev_events(struct input_handle *handle, ...@@ -314,8 +311,6 @@ static void evdev_events(struct input_handle *handle,
ev_time[EV_CLK_MONO] = ktime_get(); ev_time[EV_CLK_MONO] = ktime_get();
ev_time[EV_CLK_REAL] = ktime_mono_to_real(ev_time[EV_CLK_MONO]); ev_time[EV_CLK_REAL] = ktime_mono_to_real(ev_time[EV_CLK_MONO]);
ev_time[EV_CLK_BOOT] = ktime_mono_to_any(ev_time[EV_CLK_MONO],
TK_OFFS_BOOT);
rcu_read_lock(); rcu_read_lock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment