From 306e440daf5f40b195afd83d05dee89fa63189e7 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Thu, 30 Jun 2005 02:58:55 -0700 Subject: [PATCH] x86: i8253/i8259A lock cleanup Introduce proper declarations for i8253_lock and i8259A_lock. Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/ide/legacy/hd.c | 4 +++- drivers/input/gameport/gameport.c | 3 ++- drivers/input/joystick/analog.c | 4 +++- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c index e884cd4b22f..242029c9c0c 100644 --- a/drivers/ide/legacy/hd.c +++ b/drivers/ide/legacy/hd.c @@ -156,11 +156,13 @@ else \ #if (HD_DELAY > 0) + +#include + unsigned long last_req; unsigned long read_timer(void) { - extern spinlock_t i8253_lock; unsigned long t, flags; int i; diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index 3e72c9b1461..ab09cf4093e 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c @@ -60,12 +60,13 @@ static void gameport_disconnect_port(struct gameport *gameport); #if defined(__i386__) +#include + #define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0)) #define GET_TIME(x) do { x = get_time_pit(); } while (0) static unsigned int get_time_pit(void) { - extern spinlock_t i8253_lock; unsigned long flags; unsigned int count; diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c index 504b7d55056..c3a5739030c 100644 --- a/drivers/input/joystick/analog.c +++ b/drivers/input/joystick/analog.c @@ -140,12 +140,14 @@ struct analog_port { */ #ifdef __i386__ + +#include + #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 TIME_NAME (cpu_has_tsc?"TSC":"PIT") static unsigned int get_time_pit(void) { - extern spinlock_t i8253_lock; unsigned long flags; unsigned int count; -- cgit v1.2.3