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/char | |
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/char')
-rw-r--r-- | drivers/char/cyclades.c | 2 | ||||
-rw-r--r-- | drivers/char/hangcheck-timer.c | 3 | ||||
-rw-r--r-- | drivers/char/ip2main.c | 2 | ||||
-rw-r--r-- | drivers/char/istallion.c | 2 | ||||
-rw-r--r-- | drivers/char/keyboard.c | 3 | ||||
-rw-r--r-- | drivers/char/watchdog/mixcomwd.c | 2 |
6 files changed, 6 insertions, 8 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c index 6a5337bf0936..cf4c3648463d 100644 --- a/drivers/char/cyclades.c +++ b/drivers/char/cyclades.c | |||
@@ -865,7 +865,7 @@ static void cyz_poll(unsigned long); | |||
865 | static long cyz_polling_cycle = CZ_DEF_POLL; | 865 | static long cyz_polling_cycle = CZ_DEF_POLL; |
866 | 866 | ||
867 | static int cyz_timeron = 0; | 867 | static int cyz_timeron = 0; |
868 | static struct timer_list cyz_timerlist = TIMER_INITIALIZER(cyz_poll, 0, 0); | 868 | static DEFINE_TIMER(cyz_timerlist, cyz_poll, 0, 0); |
869 | 869 | ||
870 | #else /* CONFIG_CYZ_INTR */ | 870 | #else /* CONFIG_CYZ_INTR */ |
871 | static void cyz_rx_restart(unsigned long); | 871 | static void cyz_rx_restart(unsigned long); |
diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c index 81d811edf3c5..a54bc93353af 100644 --- a/drivers/char/hangcheck-timer.c +++ b/drivers/char/hangcheck-timer.c | |||
@@ -149,8 +149,7 @@ static unsigned long long hangcheck_tsc, hangcheck_tsc_margin; | |||
149 | 149 | ||
150 | static void hangcheck_fire(unsigned long); | 150 | static void hangcheck_fire(unsigned long); |
151 | 151 | ||
152 | static struct timer_list hangcheck_ticktock = | 152 | static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire, 0, 0); |
153 | TIMER_INITIALIZER(hangcheck_fire, 0, 0); | ||
154 | 153 | ||
155 | 154 | ||
156 | static void hangcheck_fire(unsigned long data) | 155 | static void hangcheck_fire(unsigned long data) |
diff --git a/drivers/char/ip2main.c b/drivers/char/ip2main.c index 066d7b5cb76d..9e4e26aef94e 100644 --- a/drivers/char/ip2main.c +++ b/drivers/char/ip2main.c | |||
@@ -254,7 +254,7 @@ static unsigned long bh_counter = 0; | |||
254 | * selected, the board is serviced periodically to see if anything needs doing. | 254 | * selected, the board is serviced periodically to see if anything needs doing. |
255 | */ | 255 | */ |
256 | #define POLL_TIMEOUT (jiffies + 1) | 256 | #define POLL_TIMEOUT (jiffies + 1) |
257 | static struct timer_list PollTimer = TIMER_INITIALIZER(ip2_poll, 0, 0); | 257 | static DEFINE_TIMER(PollTimer, ip2_poll, 0, 0); |
258 | static char TimerOn; | 258 | static char TimerOn; |
259 | 259 | ||
260 | #ifdef IP2DEBUG_TRACE | 260 | #ifdef IP2DEBUG_TRACE |
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c index 52a073eee201..9c19e5435a11 100644 --- a/drivers/char/istallion.c +++ b/drivers/char/istallion.c | |||
@@ -780,7 +780,7 @@ static struct file_operations stli_fsiomem = { | |||
780 | * much cheaper on host cpu than using interrupts. It turns out to | 780 | * much cheaper on host cpu than using interrupts. It turns out to |
781 | * not increase character latency by much either... | 781 | * not increase character latency by much either... |
782 | */ | 782 | */ |
783 | static struct timer_list stli_timerlist = TIMER_INITIALIZER(stli_poll, 0, 0); | 783 | static DEFINE_TIMER(stli_timerlist, stli_poll, 0, 0); |
784 | 784 | ||
785 | static int stli_timeron; | 785 | static int stli_timeron; |
786 | 786 | ||
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 523fd3c8bbaa..1745065d8f78 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c | |||
@@ -233,8 +233,7 @@ static void kd_nosound(unsigned long ignored) | |||
233 | } | 233 | } |
234 | } | 234 | } |
235 | 235 | ||
236 | static struct timer_list kd_mksound_timer = | 236 | static DEFINE_TIMER(kd_mksound_timer, kd_nosound, 0, 0); |
237 | TIMER_INITIALIZER(kd_nosound, 0, 0); | ||
238 | 237 | ||
239 | void kd_mksound(unsigned int hz, unsigned int ticks) | 238 | void kd_mksound(unsigned int hz, unsigned int ticks) |
240 | { | 239 | { |
diff --git a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c index c9b301dccec3..7fc2188386d9 100644 --- a/drivers/char/watchdog/mixcomwd.c +++ b/drivers/char/watchdog/mixcomwd.c | |||
@@ -59,7 +59,7 @@ static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */ | |||
59 | 59 | ||
60 | static int watchdog_port; | 60 | static int watchdog_port; |
61 | static int mixcomwd_timer_alive; | 61 | static int mixcomwd_timer_alive; |
62 | static struct timer_list mixcomwd_timer = TIMER_INITIALIZER(NULL, 0, 0); | 62 | static DEFINE_TIMER(mixcomwd_timer, NULL, 0, 0); |
63 | static char expect_close; | 63 | static char expect_close; |
64 | 64 | ||
65 | static int nowayout = WATCHDOG_NOWAYOUT; | 65 | static int nowayout = WATCHDOG_NOWAYOUT; |