All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Remove CLOCK_TICK_RATE from analog joystick driver
@ 2011-08-04  0:06 Deepak Saxena
  2011-08-05  6:40 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Deepak Saxena @ 2011-08-04  0:06 UTC (permalink / raw)
  To: Dmitry Torokhov; +Cc: Thomas Gleixner, linux-input

The analog joystick driver is written for x86 systems. This
patch updates it to use the the PIT_TICK_RATE value instead
of CLOCK_TICK_RATE as they are equivalent on x86 and we 
want to depecrate the later.

Signed-off-by: Deepak Saxena <dsaxena@linaro.org>
---
 drivers/input/joystick/analog.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index 9882971..358cd7e 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -139,7 +139,7 @@ struct analog_port {
 #include <linux/i8253.h>
 
 #define GET_TIME(x)	do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)
-#define DELTA(x,y)	(cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0)))
+#define DELTA(x,y)	(cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? PIT_TICK_RATE / HZ : 0)))
 #define TIME_NAME	(cpu_has_tsc?"TSC":"PIT")
 static unsigned int get_time_pit(void)
 {
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Remove CLOCK_TICK_RATE from analog joystick driver
  2011-08-04  0:06 [PATCH] Remove CLOCK_TICK_RATE from analog joystick driver Deepak Saxena
@ 2011-08-05  6:40 ` Dmitry Torokhov
  0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2011-08-05  6:40 UTC (permalink / raw)
  To: dsaxena; +Cc: Thomas Gleixner, linux-input

On Wed, Aug 03, 2011 at 05:06:40PM -0700, Deepak Saxena wrote:
> The analog joystick driver is written for x86 systems. This
> patch updates it to use the the PIT_TICK_RATE value instead
> of CLOCK_TICK_RATE as they are equivalent on x86 and we 
> want to depecrate the later.
> 
> Signed-off-by: Deepak Saxena <dsaxena@linaro.org>

Applied, thank you Deepak.

> ---
>  drivers/input/joystick/analog.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
> index 9882971..358cd7e 100644
> --- a/drivers/input/joystick/analog.c
> +++ b/drivers/input/joystick/analog.c
> @@ -139,7 +139,7 @@ struct analog_port {
>  #include <linux/i8253.h>
>  
>  #define GET_TIME(x)	do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)
> -#define DELTA(x,y)	(cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0)))
> +#define DELTA(x,y)	(cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? PIT_TICK_RATE / HZ : 0)))
>  #define TIME_NAME	(cpu_has_tsc?"TSC":"PIT")
>  static unsigned int get_time_pit(void)
>  {
> -- 
> 1.7.4.1
> 

-- 
Dmitry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-08-05  6:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-04  0:06 [PATCH] Remove CLOCK_TICK_RATE from analog joystick driver Deepak Saxena
2011-08-05  6:40 ` Dmitry Torokhov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.