aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2005-06-30 05:58:55 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-30 11:45:10 -0400
commit306e440daf5f40b195afd83d05dee89fa63189e7 (patch)
tree1f72d9d8df95a60e09968980ba6da6e8bb3d7dcf /drivers
parentbcbda35ca7470bf0123a7ae685899776f67814b2 (diff)
[PATCH] x86: i8253/i8259A lock cleanup
Introduce proper declarations for i8253_lock and i8259A_lock. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/legacy/hd.c4
-rw-r--r--drivers/input/gameport/gameport.c3
-rw-r--r--drivers/input/joystick/analog.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c
index e884cd4b22fd..242029c9c0ca 100644
--- a/drivers/ide/legacy/hd.c
+++ b/drivers/ide/legacy/hd.c
@@ -156,11 +156,13 @@ else \
156 156
157 157
158#if (HD_DELAY > 0) 158#if (HD_DELAY > 0)
159
160#include <asm/i8253.h>
161
159unsigned long last_req; 162unsigned long last_req;
160 163
161unsigned long read_timer(void) 164unsigned long read_timer(void)
162{ 165{
163 extern spinlock_t i8253_lock;
164 unsigned long t, flags; 166 unsigned long t, flags;
165 int i; 167 int i;
166 168
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c
index 3e72c9b1461e..ab09cf4093e3 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);
60 60
61#if defined(__i386__) 61#if defined(__i386__)
62 62
63#include <asm/i8253.h>
64
63#define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0)) 65#define DELTA(x,y) ((y)-(x)+((y)<(x)?1193182/HZ:0))
64#define GET_TIME(x) do { x = get_time_pit(); } while (0) 66#define GET_TIME(x) do { x = get_time_pit(); } while (0)
65 67
66static unsigned int get_time_pit(void) 68static unsigned int get_time_pit(void)
67{ 69{
68 extern spinlock_t i8253_lock;
69 unsigned long flags; 70 unsigned long flags;
70 unsigned int count; 71 unsigned int count;
71 72
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index 504b7d550567..c3a5739030c3 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -140,12 +140,14 @@ struct analog_port {
140 */ 140 */
141 141
142#ifdef __i386__ 142#ifdef __i386__
143
144#include <asm/i8253.h>
145
143#define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0) 146#define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0)
144#define DELTA(x,y) (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0))) 147#define DELTA(x,y) (cpu_has_tsc ? ((y) - (x)) : ((x) - (y) + ((x) < (y) ? CLOCK_TICK_RATE / HZ : 0)))
145#define TIME_NAME (cpu_has_tsc?"TSC":"PIT") 148#define TIME_NAME (cpu_has_tsc?"TSC":"PIT")
146static unsigned int get_time_pit(void) 149static unsigned int get_time_pit(void)
147{ 150{
148 extern spinlock_t i8253_lock;
149 unsigned long flags; 151 unsigned long flags;
150 unsigned int count; 152 unsigned int count;
151 153