diff options
author | Ingo Molnar <mingo@elte.hu> | 2005-09-09 16:10:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 17:03:48 -0400 |
commit | 8d06afab73a75f40ae2864e6c296356bab1ab473 (patch) | |
tree | 1d9c8c24a1024a12a4e8df841fba5809fa914356 /drivers/block | |
parent | 7c352bdf048811b8128019ffc1e886161e09c11c (diff) |
[PATCH] timer initialization cleanup: DEFINE_TIMER
Clean up timer initialization by introducing DEFINE_TIMER a'la
DEFINE_SPINLOCK. Build and boot-tested on x86. A similar patch has been
been in the -RT tree for some time.
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/block')
-rw-r--r-- | drivers/block/acsi.c | 2 | ||||
-rw-r--r-- | drivers/block/acsi_slm.c | 2 | ||||
-rw-r--r-- | drivers/block/ataflop.c | 14 | ||||
-rw-r--r-- | drivers/block/floppy.c | 4 | ||||
-rw-r--r-- | drivers/block/ps2esdi.c | 3 |
5 files changed, 9 insertions, 16 deletions
diff --git a/drivers/block/acsi.c b/drivers/block/acsi.c index ce933de48084..0e1f34fef0c8 100644 --- a/drivers/block/acsi.c +++ b/drivers/block/acsi.c | |||
@@ -371,7 +371,7 @@ static int acsi_revalidate (struct gendisk *disk); | |||
371 | /************************* End of Prototypes **************************/ | 371 | /************************* End of Prototypes **************************/ |
372 | 372 | ||
373 | 373 | ||
374 | struct timer_list acsi_timer = TIMER_INITIALIZER(acsi_times_out, 0, 0); | 374 | DEFINE_TIMER(acsi_timer, acsi_times_out, 0, 0); |
375 | 375 | ||
376 | 376 | ||
377 | #ifdef CONFIG_ATARI_SLM | 377 | #ifdef CONFIG_ATARI_SLM |
diff --git a/drivers/block/acsi_slm.c b/drivers/block/acsi_slm.c index e3be8c31a74c..a5c1c8e871ec 100644 --- a/drivers/block/acsi_slm.c +++ b/drivers/block/acsi_slm.c | |||
@@ -268,7 +268,7 @@ static int slm_get_pagesize( int device, int *w, int *h ); | |||
268 | /************************* End of Prototypes **************************/ | 268 | /************************* End of Prototypes **************************/ |
269 | 269 | ||
270 | 270 | ||
271 | static struct timer_list slm_timer = TIMER_INITIALIZER(slm_test_ready, 0, 0); | 271 | static DEFINE_TIMER(slm_timer, slm_test_ready, 0, 0); |
272 | 272 | ||
273 | static struct file_operations slm_fops = { | 273 | static struct file_operations slm_fops = { |
274 | .owner = THIS_MODULE, | 274 | .owner = THIS_MODULE, |
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c index db05a5a99f35..22bda05fc693 100644 --- a/drivers/block/ataflop.c +++ b/drivers/block/ataflop.c | |||
@@ -371,16 +371,10 @@ static int floppy_release( struct inode * inode, struct file * filp ); | |||
371 | 371 | ||
372 | /************************* End of Prototypes **************************/ | 372 | /************************* End of Prototypes **************************/ |
373 | 373 | ||
374 | static struct timer_list motor_off_timer = | 374 | static DEFINE_TIMER(motor_off_timer, fd_motor_off_timer, 0, 0); |
375 | TIMER_INITIALIZER(fd_motor_off_timer, 0, 0); | 375 | static DEFINE_TIMER(readtrack_timer, fd_readtrack_check, 0, 0); |
376 | static struct timer_list readtrack_timer = | 376 | static DEFINE_TIMER(timeout_timer, fd_times_out, 0, 0); |
377 | TIMER_INITIALIZER(fd_readtrack_check, 0, 0); | 377 | static DEFINE_TIMER(fd_timer, check_change, 0, 0); |
378 | |||
379 | static struct timer_list timeout_timer = | ||
380 | TIMER_INITIALIZER(fd_times_out, 0, 0); | ||
381 | |||
382 | static struct timer_list fd_timer = | ||
383 | TIMER_INITIALIZER(check_change, 0, 0); | ||
384 | 378 | ||
385 | static inline void start_motor_off_timer(void) | 379 | static inline void start_motor_off_timer(void) |
386 | { | 380 | { |
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 888dad5eef34..00895477155e 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -628,7 +628,7 @@ static inline void debugt(const char *message) { } | |||
628 | #endif /* DEBUGT */ | 628 | #endif /* DEBUGT */ |
629 | 629 | ||
630 | typedef void (*timeout_fn) (unsigned long); | 630 | typedef void (*timeout_fn) (unsigned long); |
631 | static struct timer_list fd_timeout = TIMER_INITIALIZER(floppy_shutdown, 0, 0); | 631 | static DEFINE_TIMER(fd_timeout, floppy_shutdown, 0, 0); |
632 | 632 | ||
633 | static const char *timeout_message; | 633 | static const char *timeout_message; |
634 | 634 | ||
@@ -1012,7 +1012,7 @@ static void schedule_bh(void (*handler) (void)) | |||
1012 | schedule_work(&floppy_work); | 1012 | schedule_work(&floppy_work); |
1013 | } | 1013 | } |
1014 | 1014 | ||
1015 | static struct timer_list fd_timer = TIMER_INITIALIZER(NULL, 0, 0); | 1015 | static DEFINE_TIMER(fd_timer, NULL, 0, 0); |
1016 | 1016 | ||
1017 | static void cancel_activity(void) | 1017 | static void cancel_activity(void) |
1018 | { | 1018 | { |
diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c index 29548784cb7b..29d1518be72a 100644 --- a/drivers/block/ps2esdi.c +++ b/drivers/block/ps2esdi.c | |||
@@ -99,8 +99,7 @@ static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_int); | |||
99 | static int no_int_yet; | 99 | static int no_int_yet; |
100 | static int ps2esdi_drives; | 100 | static int ps2esdi_drives; |
101 | static u_short io_base; | 101 | static u_short io_base; |
102 | static struct timer_list esdi_timer = | 102 | static DEFINE_TIMER(esdi_timer, ps2esdi_reset_timer, 0, 0); |
103 | TIMER_INITIALIZER(ps2esdi_reset_timer, 0, 0); | ||
104 | static int reset_status; | 103 | static int reset_status; |
105 | static int ps2esdi_slot = -1; | 104 | static int ps2esdi_slot = -1; |
106 | static int tp720esdi = 0; /* Is it Integrated ESDI of ThinkPad-720? */ | 105 | static int tp720esdi = 0; /* Is it Integrated ESDI of ThinkPad-720? */ |