Re: [PATCH v3] Input: analog: Always use ktime functions

From: Randy Dunlap
Date: Tue Sep 07 2021 - 20:52:57 EST


On 9/7/21 5:37 AM, Guenter Roeck wrote:
m68k, mips, s390, and sparc allmodconfig images fail to build with the
following error.

drivers/input/joystick/analog.c:160:2: error:
#warning Precise timer not defined for this architecture.

Remove architecture specific time handling code and always use ktime
functions to determine time deltas. Also remove the now useless use_ktime
kernel parameter.

Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
---
v3: Avoid 64-bit divide operation
v2: Drop helper functions and use ktime_get() and ktime_sub() directly
Drop 'speed' variable and use NSEC_PER_MSEC directly

drivers/input/joystick/analog.c | 103 ++++----------------------------
1 file changed, 11 insertions(+), 92 deletions(-)

Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx> # build-tested

thanks.
--
~Randy