Commit 8d06afab73a75f40ae2864e6c296356bab1ab473

Authored by Ingo Molnar
Committed by Linus Torvalds
1 parent 7c352bdf04

[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>

Showing 45 changed files with 62 additions and 89 deletions Side-by-side Diff

arch/i386/kernel/time.c
... ... @@ -329,8 +329,7 @@
329 329  
330 330 static void sync_cmos_clock(unsigned long dummy);
331 331  
332   -static struct timer_list sync_cmos_timer =
333   - TIMER_INITIALIZER(sync_cmos_clock, 0, 0);
  332 +static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0);
334 333  
335 334 static void sync_cmos_clock(unsigned long dummy)
336 335 {
arch/m68k/amiga/amisound.c
... ... @@ -63,7 +63,7 @@
63 63 }
64 64  
65 65 static void nosound( unsigned long ignored );
66   -static struct timer_list sound_timer = TIMER_INITIALIZER(nosound, 0, 0);
  66 +static DEFINE_TIMER(sound_timer, nosound, 0, 0);
67 67  
68 68 void amiga_mksound( unsigned int hz, unsigned int ticks )
69 69 {
arch/m68k/mac/macboing.c
... ... @@ -56,8 +56,7 @@
56 56 /*
57 57 * our timer to start/continue/stop the bell
58 58 */
59   -static struct timer_list mac_sound_timer =
60   - TIMER_INITIALIZER(mac_nosound, 0, 0);
  59 +static DEFINE_TIMER(mac_sound_timer, mac_nosound, 0, 0);
61 60  
62 61 /*
63 62 * Sort of initialize the sound chip (called from mac_mksound on the first
arch/ppc/8xx_io/cs4218_tdm.c
... ... @@ -1380,7 +1380,7 @@
1380 1380 spin_unlock_irqrestore(&cs4218_lock, flags);
1381 1381 }
1382 1382  
1383   -static struct timer_list beep_timer = TIMER_INITIALIZER(cs_nosound, 0, 0);
  1383 +static DEFINE_TIMER(beep_timer, cs_nosound, 0, 0);
1384 1384 };
1385 1385  
1386 1386 static void cs_mksound(unsigned int hz, unsigned int ticks)
drivers/acorn/block/fd1772.c
... ... @@ -376,19 +376,15 @@
376 376  
377 377 /************************* End of Prototypes **************************/
378 378  
379   -static struct timer_list motor_off_timer =
380   - TIMER_INITIALIZER(fd_motor_off_timer, 0, 0);
  379 +static DEFINE_TIMER(motor_off_timer, fd_motor_off_timer, 0, 0);
381 380  
382 381 #ifdef TRACKBUFFER
383   -static struct timer_list readtrack_timer =
384   - TIMER_INITIALIZER(fd_readtrack_check, 0, 0);
  382 +static DEFINE_TIMER(readtrack_timer, fd_readtrack_check, 0, 0);
385 383 #endif
386 384  
387   -static struct timer_list timeout_timer =
388   - TIMER_INITIALIZER(fd_times_out, 0, 0);
  385 +static DEFINE_TIMER(timeout_timer, fd_times_out, 0, 0);
389 386  
390   -static struct timer_list fd_timer =
391   - TIMER_INITIALIZER(check_change, 0, 0);
  387 +static DEFINE_TIMER(fd_timer, check_change, 0, 0);
392 388  
393 389 /* DAG: Haven't got a clue what this is? */
394 390 int stdma_islocked(void)
drivers/atm/idt77105.c
... ... @@ -50,10 +50,8 @@
50 50 static void idt77105_restart_timer_func(unsigned long);
51 51  
52 52  
53   -static struct timer_list stats_timer =
54   - TIMER_INITIALIZER(idt77105_stats_timer_func, 0, 0);
55   -static struct timer_list restart_timer =
56   - TIMER_INITIALIZER(idt77105_restart_timer_func, 0, 0);
  53 +static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func, 0, 0);
  54 +static DEFINE_TIMER(restart_timer, idt77105_restart_timer_func, 0, 0);
57 55 static int start_timer = 1;
58 56 static struct idt77105_priv *idt77105_all = NULL;
59 57  
drivers/atm/iphase.c
... ... @@ -79,7 +79,7 @@
79 79 static struct atm_dev *_ia_dev[8];
80 80 static int iadev_count;
81 81 static void ia_led_timer(unsigned long arg);
82   -static struct timer_list ia_timer = TIMER_INITIALIZER(ia_led_timer, 0, 0);
  82 +static DEFINE_TIMER(ia_timer, ia_led_timer, 0, 0);
83 83 static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ;
84 84 static int IA_RX_BUF = DFL_RX_BUFFERS, IA_RX_BUF_SZ = DFL_RX_BUF_SZ;
85 85 static uint IADebugFlag = /* IF_IADBG_ERR | IF_IADBG_CBR| IF_IADBG_INIT_ADAPTER
drivers/block/acsi.c
... ... @@ -371,7 +371,7 @@
371 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 377 #ifdef CONFIG_ATARI_SLM
drivers/block/acsi_slm.c
... ... @@ -268,7 +268,7 @@
268 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 273 static struct file_operations slm_fops = {
274 274 .owner = THIS_MODULE,
drivers/block/ataflop.c
... ... @@ -371,16 +371,10 @@
371 371  
372 372 /************************* End of Prototypes **************************/
373 373  
374   -static struct timer_list motor_off_timer =
375   - TIMER_INITIALIZER(fd_motor_off_timer, 0, 0);
376   -static struct timer_list readtrack_timer =
377   - TIMER_INITIALIZER(fd_readtrack_check, 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);
  374 +static DEFINE_TIMER(motor_off_timer, fd_motor_off_timer, 0, 0);
  375 +static DEFINE_TIMER(readtrack_timer, fd_readtrack_check, 0, 0);
  376 +static DEFINE_TIMER(timeout_timer, fd_times_out, 0, 0);
  377 +static DEFINE_TIMER(fd_timer, check_change, 0, 0);
384 378  
385 379 static inline void start_motor_off_timer(void)
386 380 {
drivers/block/floppy.c
... ... @@ -628,7 +628,7 @@
628 628 #endif /* DEBUGT */
629 629  
630 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 633 static const char *timeout_message;
634 634  
... ... @@ -1012,7 +1012,7 @@
1012 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 1017 static void cancel_activity(void)
1018 1018 {
drivers/block/ps2esdi.c
... ... @@ -99,8 +99,7 @@
99 99 static int no_int_yet;
100 100 static int ps2esdi_drives;
101 101 static u_short io_base;
102   -static struct timer_list esdi_timer =
103   - TIMER_INITIALIZER(ps2esdi_reset_timer, 0, 0);
  102 +static DEFINE_TIMER(esdi_timer, ps2esdi_reset_timer, 0, 0);
104 103 static int reset_status;
105 104 static int ps2esdi_slot = -1;
106 105 static int tp720esdi = 0; /* Is it Integrated ESDI of ThinkPad-720? */
drivers/cdrom/aztcd.c
... ... @@ -297,7 +297,7 @@
297 297  
298 298 static int AztTimeout, AztTries;
299 299 static DECLARE_WAIT_QUEUE_HEAD(azt_waitq);
300   -static struct timer_list delay_timer = TIMER_INITIALIZER(NULL, 0, 0);
  300 +static DEFINE_TIMER(delay_timer, NULL, 0, 0);
301 301  
302 302 static struct azt_DiskInfo DiskInfo;
303 303 static struct azt_Toc Toc[MAX_TRACKS];
drivers/cdrom/gscd.c
... ... @@ -146,7 +146,7 @@
146 146 static int AudioEnd_m;
147 147 static int AudioEnd_f;
148 148  
149   -static struct timer_list gscd_timer = TIMER_INITIALIZER(NULL, 0, 0);
  149 +static DEFINE_TIMER(gscd_timer, NULL, 0, 0);
150 150 static DEFINE_SPINLOCK(gscd_lock);
151 151 static struct request_queue *gscd_queue;
152 152  
drivers/cdrom/optcd.c
... ... @@ -264,7 +264,7 @@
264 264 static int sleep_timeout; /* max # of ticks to sleep */
265 265 static DECLARE_WAIT_QUEUE_HEAD(waitq);
266 266 static void sleep_timer(unsigned long data);
267   -static struct timer_list delay_timer = TIMER_INITIALIZER(sleep_timer, 0, 0);
  267 +static DEFINE_TIMER(delay_timer, sleep_timer, 0, 0);
268 268 static DEFINE_SPINLOCK(optcd_lock);
269 269 static struct request_queue *opt_queue;
270 270  
drivers/cdrom/sbpcd.c
... ... @@ -742,13 +742,10 @@
742 742 unsigned long cli_sti; /* for saving the processor flags */
743 743 #endif
744 744 /*==========================================================================*/
745   -static struct timer_list delay_timer =
746   - TIMER_INITIALIZER(mark_timeout_delay, 0, 0);
747   -static struct timer_list data_timer =
748   - TIMER_INITIALIZER(mark_timeout_data, 0, 0);
  745 +static DEFINE_TIMER(delay_timer, mark_timeout_delay, 0, 0);
  746 +static DEFINE_TIMER(data_timer, mark_timeout_data, 0, 0);
749 747 #if 0
750   -static struct timer_list audio_timer =
751   - TIMER_INITIALIZER(mark_timeout_audio, 0, 0);
  748 +static DEFINE_TIMER(audio_timer, mark_timeout_audio, 0, 0);
752 749 #endif
753 750 /*==========================================================================*/
754 751 /*
drivers/cdrom/sjcd.c
... ... @@ -151,7 +151,7 @@
151 151 /*
152 152 * Timer.
153 153 */
154   -static struct timer_list sjcd_delay_timer = TIMER_INITIALIZER(NULL, 0, 0);
  154 +static DEFINE_TIMER(sjcd_delay_timer, NULL, 0, 0);
155 155  
156 156 #define SJCD_SET_TIMER( func, tmout ) \
157 157 ( sjcd_delay_timer.expires = jiffies+tmout, \
drivers/char/cyclades.c
... ... @@ -865,7 +865,7 @@
865 865 static long cyz_polling_cycle = CZ_DEF_POLL;
866 866  
867 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 870 #else /* CONFIG_CYZ_INTR */
871 871 static void cyz_rx_restart(unsigned long);
drivers/char/hangcheck-timer.c
... ... @@ -149,8 +149,7 @@
149 149  
150 150 static void hangcheck_fire(unsigned long);
151 151  
152   -static struct timer_list hangcheck_ticktock =
153   - TIMER_INITIALIZER(hangcheck_fire, 0, 0);
  152 +static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire, 0, 0);
154 153  
155 154  
156 155 static void hangcheck_fire(unsigned long data)
drivers/char/ip2main.c
... ... @@ -254,7 +254,7 @@
254 254 * selected, the board is serviced periodically to see if anything needs doing.
255 255 */
256 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 258 static char TimerOn;
259 259  
260 260 #ifdef IP2DEBUG_TRACE
drivers/char/istallion.c
... ... @@ -780,7 +780,7 @@
780 780 * much cheaper on host cpu than using interrupts. It turns out to
781 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 785 static int stli_timeron;
786 786  
drivers/char/keyboard.c
... ... @@ -233,8 +233,7 @@
233 233 }
234 234 }
235 235  
236   -static struct timer_list kd_mksound_timer =
237   - TIMER_INITIALIZER(kd_nosound, 0, 0);
  236 +static DEFINE_TIMER(kd_mksound_timer, kd_nosound, 0, 0);
238 237  
239 238 void kd_mksound(unsigned int hz, unsigned int ticks)
240 239 {
drivers/char/watchdog/mixcomwd.c
... ... @@ -59,7 +59,7 @@
59 59  
60 60 static int watchdog_port;
61 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 63 static char expect_close;
64 64  
65 65 static int nowayout = WATCHDOG_NOWAYOUT;
drivers/net/atari_bionet.c
... ... @@ -155,7 +155,7 @@
155 155 static struct net_device_stats *net_get_stats(struct net_device *dev);
156 156 static void bionet_tick(unsigned long);
157 157  
158   -static struct timer_list bionet_timer = TIMER_INITIALIZER(bionet_tick, 0, 0);
  158 +static DEFINE_TIMER(bionet_timer, bionet_tick, 0, 0);
159 159  
160 160 #define STRAM_ADDR(a) (((a) & 0xff000000) == 0)
161 161  
drivers/net/atari_pamsnet.c
... ... @@ -165,7 +165,7 @@
165 165  
166 166 static irqreturn_t pamsnet_intr(int irq, void *data, struct pt_regs *fp);
167 167  
168   -static struct timer_list pamsnet_timer = TIMER_INITIALIZER(pamsnet_tick, 0, 0);
  168 +static DEFINE_TIMER(pamsnet_timer, pamsnet_tick, 0, 0);
169 169  
170 170 #define STRAM_ADDR(a) (((a) & 0xff000000) == 0)
171 171  
drivers/net/cris/eth_v10.c
... ... @@ -384,8 +384,8 @@
384 384 static unsigned int network_tr_ctrl_shadow = 0;
385 385  
386 386 /* Network speed indication. */
387   -static struct timer_list speed_timer = TIMER_INITIALIZER(NULL, 0, 0);
388   -static struct timer_list clear_led_timer = TIMER_INITIALIZER(NULL, 0, 0);
  387 +static DEFINE_TIMER(speed_timer, NULL, 0, 0);
  388 +static DEFINE_TIMER(clear_led_timer, NULL, 0, 0);
389 389 static int current_speed; /* Speed read from transceiver */
390 390 static int current_speed_selection; /* Speed selected by user */
391 391 static unsigned long led_next_time;
... ... @@ -393,7 +393,7 @@
393 393 static int rx_queue_len;
394 394  
395 395 /* Duplex */
396   -static struct timer_list duplex_timer = TIMER_INITIALIZER(NULL, 0, 0);
  396 +static DEFINE_TIMER(duplex_timer, NULL, 0, 0);
397 397 static int full_duplex;
398 398 static enum duplex current_duplex;
399 399  
drivers/net/hamradio/yam.c
... ... @@ -170,7 +170,7 @@
170 170 static char ax25_test[7] =
171 171 {'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1};
172 172  
173   -static struct timer_list yam_timer = TIMER_INITIALIZER(NULL, 0, 0);
  173 +static DEFINE_TIMER(yam_timer, NULL, 0, 0);
174 174  
175 175 /* --------------------------------------------------------------------- */
176 176  
drivers/sbus/char/aurora.c
... ... @@ -871,8 +871,7 @@
871 871 #ifdef AURORA_INT_DEBUG
872 872 static void aurora_timer (unsigned long ignored);
873 873  
874   -static struct timer_list aurora_poll_timer =
875   - TIMER_INITIALIZER(aurora_timer, 0, 0);
  874 +static DEFINE_TIMER(aurora_poll_timer, aurora_timer, 0, 0);
876 875  
877 876 static void
878 877 aurora_timer (unsigned long ignored)
drivers/scsi/pluto.c
... ... @@ -95,8 +95,7 @@
95 95 int i, retry, nplutos;
96 96 fc_channel *fc;
97 97 Scsi_Device dev;
98   - struct timer_list fc_timer =
99   - TIMER_INITIALIZER(pluto_detect_timeout, 0, 0);
  98 + DEFINE_TIMER(fc_timer, pluto_detect_timeout, 0, 0);
100 99  
101 100 tpnt->proc_name = "pluto";
102 101 fcscount = 0;
drivers/usb/host/hc_crisv10.c
... ... @@ -178,8 +178,8 @@
178 178 0xff /* __u8 PortPwrCtrlMask; *** 7 ports max *** */
179 179 };
180 180  
181   -static struct timer_list bulk_start_timer = TIMER_INITIALIZER(NULL, 0, 0);
182   -static struct timer_list bulk_eot_timer = TIMER_INITIALIZER(NULL, 0, 0);
  181 +static DEFINE_TIMER(bulk_start_timer, NULL, 0, 0);
  182 +static DEFINE_TIMER(bulk_eot_timer, NULL, 0, 0);
183 183  
184 184 /* We want the start timer to expire before the eot timer, because the former might start
185 185 traffic, thus making it unnecessary for the latter to time out. */
include/linux/timer.h
... ... @@ -32,6 +32,10 @@
32 32 .magic = TIMER_MAGIC, \
33 33 }
34 34  
  35 +#define DEFINE_TIMER(_name, _function, _expires, _data) \
  36 + struct timer_list _name = \
  37 + TIMER_INITIALIZER(_function, _expires, _data)
  38 +
35 39 void fastcall init_timer(struct timer_list * timer);
36 40  
37 41 /***
... ... @@ -368,10 +368,8 @@
368 368 static void wb_timer_fn(unsigned long unused);
369 369 static void laptop_timer_fn(unsigned long unused);
370 370  
371   -static struct timer_list wb_timer =
372   - TIMER_INITIALIZER(wb_timer_fn, 0, 0);
373   -static struct timer_list laptop_mode_wb_timer =
374   - TIMER_INITIALIZER(laptop_timer_fn, 0, 0);
  371 +static DEFINE_TIMER(wb_timer, wb_timer_fn, 0, 0);
  372 +static DEFINE_TIMER(laptop_mode_wb_timer, laptop_timer_fn, 0, 0);
375 373  
376 374 /*
377 375 * Periodic writeback of "old" data.
... ... @@ -105,7 +105,7 @@
105 105  
106 106 struct mpoa_client *mpcs = NULL; /* FIXME */
107 107 static struct atm_mpoa_qos *qos_head = NULL;
108   -static struct timer_list mpc_timer = TIMER_INITIALIZER(NULL, 0, 0);
  108 +static DEFINE_TIMER(mpc_timer, NULL, 0, 0);
109 109  
110 110  
111 111 static struct mpoa_client *find_mpc_by_itfnum(int itf)
... ... @@ -39,8 +39,7 @@
39 39 static void dst_run_gc(unsigned long);
40 40 static void ___dst_free(struct dst_entry * dst);
41 41  
42   -static struct timer_list dst_gc_timer =
43   - TIMER_INITIALIZER(dst_run_gc, DST_GC_MIN, 0);
  42 +static DEFINE_TIMER(dst_gc_timer, dst_run_gc, DST_GC_MIN, 0);
44 43  
45 44 static void dst_run_gc(unsigned long dummy)
46 45 {
net/decnet/dn_route.c
... ... @@ -117,8 +117,7 @@
117 117 static unsigned dn_rt_hash_mask;
118 118  
119 119 static struct timer_list dn_route_timer;
120   -static struct timer_list dn_rt_flush_timer =
121   - TIMER_INITIALIZER(dn_run_flush, 0, 0);
  120 +static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush, 0, 0);
122 121 int decnet_dst_gc_interval = 2;
123 122  
124 123 static struct dst_ops dn_dst_ops = {
... ... @@ -100,8 +100,7 @@
100 100 #define PEER_MAX_CLEANUP_WORK 30
101 101  
102 102 static void peer_check_expire(unsigned long dummy);
103   -static struct timer_list peer_periodic_timer =
104   - TIMER_INITIALIZER(peer_check_expire, 0, 0);
  103 +static DEFINE_TIMER(peer_periodic_timer, peer_check_expire, 0, 0);
105 104  
106 105 /* Exported for sysctl_net_ipv4. */
107 106 int inet_peer_gc_mintime = 10 * HZ,
... ... @@ -123,8 +123,7 @@
123 123  
124 124 static void addrconf_verify(unsigned long);
125 125  
126   -static struct timer_list addr_chk_timer =
127   - TIMER_INITIALIZER(addrconf_verify, 0, 0);
  126 +static DEFINE_TIMER(addr_chk_timer, addrconf_verify, 0, 0);
128 127 static DEFINE_SPINLOCK(addrconf_verify_lock);
129 128  
130 129 static void addrconf_join_anycast(struct inet6_ifaddr *ifp);
... ... @@ -92,7 +92,7 @@
92 92  
93 93 static __u32 rt_sernum;
94 94  
95   -static struct timer_list ip6_fib_timer = TIMER_INITIALIZER(fib6_run_gc, 0, 0);
  95 +static DEFINE_TIMER(ip6_fib_timer, fib6_run_gc, 0, 0);
96 96  
97 97 struct fib6_walker_t fib6_walker_list = {
98 98 .prev = &fib6_walker_list,
net/ipv6/ip6_flowlabel.c
... ... @@ -50,7 +50,7 @@
50 50 static struct ip6_flowlabel *fl_ht[FL_HASH_MASK+1];
51 51  
52 52 static void ip6_fl_gc(unsigned long dummy);
53   -static struct timer_list ip6_fl_gc_timer = TIMER_INITIALIZER(ip6_fl_gc, 0, 0);
  53 +static DEFINE_TIMER(ip6_fl_gc_timer, ip6_fl_gc, 0, 0);
54 54  
55 55 /* FL hash table lock: it protects only of GC */
56 56  
net/netrom/nr_loopback.c
... ... @@ -17,7 +17,7 @@
17 17 static void nr_loopback_timer(unsigned long);
18 18  
19 19 static struct sk_buff_head loopback_queue;
20   -static struct timer_list loopback_timer = TIMER_INITIALIZER(nr_loopback_timer, 0, 0);
  20 +static DEFINE_TIMER(loopback_timer, nr_loopback_timer, 0, 0);
21 21  
22 22 void __init nr_loopback_init(void)
23 23 {
... ... @@ -1194,7 +1194,7 @@
1194 1194 * with 32-bit get_cycles(). Safe up to 4GHz CPU.
1195 1195 */
1196 1196 static void psched_tick(unsigned long);
1197   -static struct timer_list psched_timer = TIMER_INITIALIZER(psched_tick, 0, 0);
  1197 +static DEFINE_TIMER(psched_timer, psched_tick, 0, 0);
1198 1198  
1199 1199 static void psched_tick(unsigned long dummy)
1200 1200 {
... ... @@ -50,7 +50,7 @@
50 50 static void midi_poll(unsigned long dummy);
51 51  
52 52  
53   -static struct timer_list poll_timer = TIMER_INITIALIZER(midi_poll, 0, 0);
  53 +static DEFINE_TIMER(poll_timer, midi_poll, 0, 0);
54 54  
55 55 static volatile int open_devs;
56 56 static DEFINE_SPINLOCK(lock);
sound/oss/soundcard.c
... ... @@ -681,8 +681,7 @@
681 681 }
682 682  
683 683  
684   -static struct timer_list seq_timer =
685   - TIMER_INITIALIZER(do_sequencer_timer, 0, 0);
  684 +static DEFINE_TIMER(seq_timer, do_sequencer_timer, 0, 0);
686 685  
687 686 void request_sound_timer(int count)
688 687 {
sound/oss/sys_timer.c
... ... @@ -28,8 +28,7 @@
28 28  
29 29 static void poll_def_tmr(unsigned long dummy);
30 30 static DEFINE_SPINLOCK(lock);
31   -
32   -static struct timer_list def_tmr = TIMER_INITIALIZER(poll_def_tmr, 0, 0);
  31 +static DEFINE_TIMER(def_tmr, poll_def_tmr, 0, 0);
33 32  
34 33 static unsigned long
35 34 tmr2ticks(int tmr_value)
sound/oss/uart6850.c
... ... @@ -78,8 +78,7 @@
78 78 static void poll_uart6850(unsigned long dummy);
79 79  
80 80  
81   -static struct timer_list uart6850_timer =
82   - TIMER_INITIALIZER(poll_uart6850, 0, 0);
  81 +static DEFINE_TIMER(uart6850_timer, poll_uart6850, 0, 0);
83 82  
84 83 static void uart6850_input_loop(void)
85 84 {