Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 537 → Rev 538

/shark/trunk/drivers/input/joystick/analog.c
1,5 → 1,5
/*
* $Id: analog.c,v 1.1 2004-03-08 18:47:38 giacomo Exp $
* $Id: analog.c,v 1.2 2004-03-29 18:27:43 mauro Exp $
*
* Copyright (c) 1996-2001 Vojtech Pavlik
*/
139,9 → 139,13
*/
 
#ifdef __i386__
#define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)
/* !!! Added by Nino !!! */
#define GET_TIME(x) (x = get_time_pit())
#define DELTA(x,y) ((y)-(x))
#define TIME_NAME ("Shark")
/*#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)?1193182L/HZ:0)))
#define TIME_NAME (cpu_has_tsc?"TSC":"PIT")
#define TIME_NAME (cpu_has_tsc?"TSC":"PIT")*/
static unsigned int get_time_pit(void)
{
extern spinlock_t i8253_lock;
335,7 → 339,7
if (port->analog[i].mask)
analog_decode(port->analog + i, port->axes, port->initial, port->buttons);
 
mod_timer(&port->timer, jiffies + ANALOG_REFRESH_TIME);
mod_timer(&port->timer, jiffies26 + ANALOG_REFRESH_TIME);
}
 
/*
346,7 → 350,7
{
struct analog_port *port = dev->private;
if (!port->used++)
mod_timer(&port->timer, jiffies + ANALOG_REFRESH_TIME);
mod_timer(&port->timer, jiffies26 + ANALOG_REFRESH_TIME);
return 0;
}