Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

input/joystick: use get_cycles on ARM

ARM normally has an accurate clock source, so
we can theoretically use analog joysticks more
accurately and at the same time avoid the
build warning

#warning Precise timer not defined for this architecture.

from the joystick driver.

Now, why anybody would use that driver no ARM I have no
idea, but Ben Dooks enabled it in the s3c2410_defconfig
along with a bunch of other drivers, even though that
platform has neither ISA nor PCI support. It still
seems to be the right thing to fix this quirk.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Cc: Ben Dooks <ben-linux@fluff.org>

+2 -6
+2 -6
drivers/input/joystick/analog.c
··· 158 158 #define GET_TIME(x) rdtscl(x) 159 159 #define DELTA(x,y) ((y)-(x)) 160 160 #define TIME_NAME "TSC" 161 - #elif defined(__alpha__) 161 + #elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_TILE) 162 162 #define GET_TIME(x) do { x = get_cycles(); } while (0) 163 163 #define DELTA(x,y) ((y)-(x)) 164 - #define TIME_NAME "PCC" 165 - #elif defined(CONFIG_MN10300) || defined(CONFIG_TILE) 166 - #define GET_TIME(x) do { x = get_cycles(); } while (0) 167 - #define DELTA(x, y) ((x) - (y)) 168 - #define TIME_NAME "TSC" 164 + #define TIME_NAME "get_cycles" 169 165 #else 170 166 #define FAKE_TIME 171 167 static unsigned long analog_faketime = 0;