HID: intel_ish-hid: convert timespec to ktime_t
authorArnd Bergmann <arnd@arndb.de>
Thu, 18 May 2017 20:21:42 +0000 (22:21 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 30 May 2017 12:11:52 +0000 (14:11 +0200)
commit2503f7babbc7f570d06cfa3ca6b7ceec9262ced3
tree18102daa626df1b77b1d0f29d7db077bd4b091c4
parent538be0aa8610168d7a8f4b119452056f537cff46
HID: intel_ish-hid: convert timespec to ktime_t

The internal accounting uses 'timespec' based time stamps, which is
slightly inefficient and also problematic once we get to the time_t
overflow in 2038.

When communicating to the firmware, we even get an open-coded 64-bit
division that prevents the code from being build-tested on 32-bit
architectures and is inefficient due to the double conversion from
64-bit nanoseconds to seconds+nanoseconds and then microseconds.

This changes the code to use ktime_t instead.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/intel-ish-hid/ipc/ipc.c
drivers/hid/intel-ish-hid/ishtp/client.c
drivers/hid/intel-ish-hid/ishtp/client.h
drivers/hid/intel-ish-hid/ishtp/hbm.c