diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-02-13 17:11:09 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-03-14 22:38:20 +0100 |
commit | 6fdd496e07f511a94ba27e4a1433038b32d6af05 (patch) | |
tree | 58f824cdb5845ada70b725379198bdb3db52fd6d /drivers/input/joystick | |
parent | [media] s5p-fimc: fix s5pv210 build (diff) | |
download | linux-6fdd496e07f511a94ba27e4a1433038b32d6af05.tar.xz linux-6fdd496e07f511a94ba27e4a1433038b32d6af05.zip |
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>
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/analog.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 7cd74e29cbc8..9135606c8649 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c @@ -158,14 +158,10 @@ static unsigned int get_time_pit(void) #define GET_TIME(x) rdtscl(x) #define DELTA(x,y) ((y)-(x)) #define TIME_NAME "TSC" -#elif defined(__alpha__) +#elif defined(__alpha__) || defined(CONFIG_MN10300) || defined(CONFIG_ARM) || defined(CONFIG_TILE) #define GET_TIME(x) do { x = get_cycles(); } while (0) #define DELTA(x,y) ((y)-(x)) -#define TIME_NAME "PCC" -#elif defined(CONFIG_MN10300) || defined(CONFIG_TILE) -#define GET_TIME(x) do { x = get_cycles(); } while (0) -#define DELTA(x, y) ((x) - (y)) -#define TIME_NAME "TSC" +#define TIME_NAME "get_cycles" #else #define FAKE_TIME static unsigned long analog_faketime = 0; |