]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] timer initialization cleanup: DEFINE_TIMER
authorIngo Molnar <mingo@elte.hu>
Fri, 9 Sep 2005 20:10:40 +0000 (13:10 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 9 Sep 2005 21:03:48 +0000 (14:03 -0700)
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>
45 files changed:
arch/i386/kernel/time.c
arch/m68k/amiga/amisound.c
arch/m68k/mac/macboing.c
arch/ppc/8xx_io/cs4218_tdm.c
drivers/acorn/block/fd1772.c
drivers/atm/idt77105.c
drivers/atm/iphase.c
drivers/block/acsi.c
drivers/block/acsi_slm.c
drivers/block/ataflop.c
drivers/block/floppy.c
drivers/block/ps2esdi.c
drivers/cdrom/aztcd.c
drivers/cdrom/gscd.c
drivers/cdrom/optcd.c
drivers/cdrom/sbpcd.c
drivers/cdrom/sjcd.c
drivers/char/cyclades.c
drivers/char/hangcheck-timer.c
drivers/char/ip2main.c
drivers/char/istallion.c
drivers/char/keyboard.c
drivers/char/watchdog/mixcomwd.c
drivers/net/atari_bionet.c
drivers/net/atari_pamsnet.c
drivers/net/cris/eth_v10.c
drivers/net/hamradio/yam.c
drivers/sbus/char/aurora.c
drivers/scsi/pluto.c
drivers/usb/host/hc_crisv10.c
include/linux/timer.h
mm/page-writeback.c
net/atm/mpc.c
net/core/dst.c
net/decnet/dn_route.c
net/ipv4/inetpeer.c
net/ipv6/addrconf.c
net/ipv6/ip6_fib.c
net/ipv6/ip6_flowlabel.c
net/netrom/nr_loopback.c
net/sched/sch_api.c
sound/oss/midibuf.c
sound/oss/soundcard.c
sound/oss/sys_timer.c
sound/oss/uart6850.c

index eefea7c5500893bd47e9d9485f7111ae34cd76e1..2883a4d4f01f824bfdc48457b82f3c0212b2690c 100644 (file)
@@ -329,8 +329,7 @@ EXPORT_SYMBOL(get_cmos_time);
 
 static void sync_cmos_clock(unsigned long dummy);
 
-static struct timer_list sync_cmos_timer =
-                                      TIMER_INITIALIZER(sync_cmos_clock, 0, 0);
+static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0);
 
 static void sync_cmos_clock(unsigned long dummy)
 {
index cb5d93630467230ac6f9de5d2e9a0f468a859f8d..bd5d134e9f123856fc052ad5139a7a137b848d6a 100644 (file)
@@ -63,7 +63,7 @@ void __init amiga_init_sound(void)
 }
 
 static void nosound( unsigned long ignored );
-static struct timer_list sound_timer = TIMER_INITIALIZER(nosound, 0, 0);
+static DEFINE_TIMER(sound_timer, nosound, 0, 0);
 
 void amiga_mksound( unsigned int hz, unsigned int ticks )
 {
index 44c5cd2ad6a8d6c2ec9969df090625205ff67b39..8f0640847ad2bf7bf99d0a184ed10ce8272a84f8 100644 (file)
@@ -56,8 +56,7 @@ static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int );
 /*
  * our timer to start/continue/stop the bell
  */
-static struct timer_list mac_sound_timer =
-               TIMER_INITIALIZER(mac_nosound, 0, 0);
+static DEFINE_TIMER(mac_sound_timer, mac_nosound, 0, 0);
 
 /*
  * Sort of initialize the sound chip (called from mac_mksound on the first
index 89fe0ceeaa40294dfacdffc15590af7f5623e299..2ca9ec7ec3a7b4d161be57bf48f5dd3d76c18773 100644 (file)
@@ -1380,7 +1380,7 @@ static void cs_nosound(unsigned long xx)
        spin_unlock_irqrestore(&cs4218_lock, flags);
 }
 
-static struct timer_list beep_timer = TIMER_INITIALIZER(cs_nosound, 0, 0);
+static DEFINE_TIMER(beep_timer, cs_nosound, 0, 0);
 };
 
 static void cs_mksound(unsigned int hz, unsigned int ticks)
index c0a37d98b4f3d3c3c485de77ac2391295089852b..048542341204e716bc24e721914a240cf781426e 100644 (file)
@@ -376,19 +376,15 @@ static void do_fd_request(request_queue_t *);
 
 /************************* End of Prototypes **************************/
 
-static struct timer_list motor_off_timer =
-       TIMER_INITIALIZER(fd_motor_off_timer, 0, 0);
+static DEFINE_TIMER(motor_off_timer, fd_motor_off_timer, 0, 0);
 
 #ifdef TRACKBUFFER
-static struct timer_list readtrack_timer =
-       TIMER_INITIALIZER(fd_readtrack_check, 0, 0);
+static DEFINE_TIMER(readtrack_timer, fd_readtrack_check, 0, 0);
 #endif
 
-static struct timer_list timeout_timer =
-       TIMER_INITIALIZER(fd_times_out, 0, 0);
+static DEFINE_TIMER(timeout_timer, fd_times_out, 0, 0);
 
-static struct timer_list fd_timer =
-       TIMER_INITIALIZER(check_change, 0, 0);
+static DEFINE_TIMER(fd_timer, check_change, 0, 0);
 
 /* DAG: Haven't got a clue what this is? */
 int stdma_islocked(void)
index b8c260ed4b27aeef6ff45a17c14b2e7d21d037c5..0aabfc2a59d9e42a574673772a34765dc64f5ab6 100644 (file)
@@ -50,10 +50,8 @@ static void idt77105_stats_timer_func(unsigned long);
 static void idt77105_restart_timer_func(unsigned long);
 
 
-static struct timer_list stats_timer =
-    TIMER_INITIALIZER(idt77105_stats_timer_func, 0, 0);
-static struct timer_list restart_timer =
-    TIMER_INITIALIZER(idt77105_restart_timer_func, 0, 0);
+static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func, 0, 0);
+static DEFINE_TIMER(restart_timer, idt77105_restart_timer_func, 0, 0);
 static int start_timer = 1;
 static struct idt77105_priv *idt77105_all = NULL;
 
index a43575acb2c1d16bba33a68e725650c1eae28660..2e2e50e1167a3b59f31a809bfbea43992b19b478 100644 (file)
@@ -79,7 +79,7 @@ static IADEV *ia_dev[8];
 static struct atm_dev *_ia_dev[8];
 static int iadev_count;
 static void ia_led_timer(unsigned long arg);
-static struct timer_list ia_timer = TIMER_INITIALIZER(ia_led_timer, 0, 0);
+static DEFINE_TIMER(ia_timer, ia_led_timer, 0, 0);
 static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ;
 static int IA_RX_BUF = DFL_RX_BUFFERS, IA_RX_BUF_SZ = DFL_RX_BUF_SZ;
 static uint IADebugFlag = /* IF_IADBG_ERR | IF_IADBG_CBR| IF_IADBG_INIT_ADAPTER
index ce933de4808494445996ee5c161f8dbca576222e..0e1f34fef0c838e26b49e18706dd4c30e8f6bc8b 100644 (file)
@@ -371,7 +371,7 @@ static int acsi_revalidate (struct gendisk *disk);
 /************************* End of Prototypes **************************/
 
 
-struct timer_list acsi_timer = TIMER_INITIALIZER(acsi_times_out, 0, 0);
+DEFINE_TIMER(acsi_timer, acsi_times_out, 0, 0);
 
 
 #ifdef CONFIG_ATARI_SLM
index e3be8c31a74ccb5dbc8ef1005682239cd5d2d667..a5c1c8e871ec38aacc9abcbbe15a211ab3269b85 100644 (file)
@@ -268,7 +268,7 @@ static int slm_get_pagesize( int device, int *w, int *h );
 /************************* End of Prototypes **************************/
 
 
-static struct timer_list slm_timer = TIMER_INITIALIZER(slm_test_ready, 0, 0);
+static DEFINE_TIMER(slm_timer, slm_test_ready, 0, 0);
 
 static struct file_operations slm_fops = {
        .owner =        THIS_MODULE,
index db05a5a99f354537ce3bd69de48e8a84a3cd14dd..22bda05fc693f454e801ce902ec248a2416572bd 100644 (file)
@@ -371,16 +371,10 @@ static int floppy_release( struct inode * inode, struct file * filp );
 
 /************************* End of Prototypes **************************/
 
-static struct timer_list motor_off_timer =
-       TIMER_INITIALIZER(fd_motor_off_timer, 0, 0);
-static struct timer_list readtrack_timer =
-       TIMER_INITIALIZER(fd_readtrack_check, 0, 0);
-
-static struct timer_list timeout_timer =
-       TIMER_INITIALIZER(fd_times_out, 0, 0);
-
-static struct timer_list fd_timer =
-       TIMER_INITIALIZER(check_change, 0, 0);
+static DEFINE_TIMER(motor_off_timer, fd_motor_off_timer, 0, 0);
+static DEFINE_TIMER(readtrack_timer, fd_readtrack_check, 0, 0);
+static DEFINE_TIMER(timeout_timer, fd_times_out, 0, 0);
+static DEFINE_TIMER(fd_timer, check_change, 0, 0);
        
 static inline void start_motor_off_timer(void)
 {
index 888dad5eef34994fad9718223f31a1fc8513866f..00895477155e69aaac17792f253681d0e4c0a2d0 100644 (file)
@@ -628,7 +628,7 @@ static inline void debugt(const char *message) { }
 #endif /* DEBUGT */
 
 typedef void (*timeout_fn) (unsigned long);
-static struct timer_list fd_timeout = TIMER_INITIALIZER(floppy_shutdown, 0, 0);
+static DEFINE_TIMER(fd_timeout, floppy_shutdown, 0, 0);
 
 static const char *timeout_message;
 
@@ -1012,7 +1012,7 @@ static void schedule_bh(void (*handler) (void))
        schedule_work(&floppy_work);
 }
 
-static struct timer_list fd_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(fd_timer, NULL, 0, 0);
 
 static void cancel_activity(void)
 {
index 29548784cb7b1ab734c65e68897867a7c992523e..29d1518be72a16ba980e71eb829a671208e1fbdf 100644 (file)
@@ -99,8 +99,7 @@ static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_int);
 static int no_int_yet;
 static int ps2esdi_drives;
 static u_short io_base;
-static struct timer_list esdi_timer =
-               TIMER_INITIALIZER(ps2esdi_reset_timer, 0, 0);
+static DEFINE_TIMER(esdi_timer, ps2esdi_reset_timer, 0, 0);
 static int reset_status;
 static int ps2esdi_slot = -1;
 static int tp720esdi = 0;      /* Is it Integrated ESDI of ThinkPad-720? */
index 43bf1e5dc38a4dfb0a6a0285b9fe041875bc21fa..ce4a1ce59d6a2369ee22bbebeca2f4bc62346659 100644 (file)
@@ -297,7 +297,7 @@ static char azt_auto_eject = AZT_AUTO_EJECT;
 
 static int AztTimeout, AztTries;
 static DECLARE_WAIT_QUEUE_HEAD(azt_waitq);
-static struct timer_list delay_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(delay_timer, NULL, 0, 0);
 
 static struct azt_DiskInfo DiskInfo;
 static struct azt_Toc Toc[MAX_TRACKS];
index 7eac10e63b2356d73e360b3cdb113b45019d77d7..ad5464ab99bce830fc22984ff1cf77ac176c51d2 100644 (file)
@@ -146,7 +146,7 @@ static int AudioStart_f;
 static int AudioEnd_m;
 static int AudioEnd_f;
 
-static struct timer_list gscd_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(gscd_timer, NULL, 0, 0);
 static DEFINE_SPINLOCK(gscd_lock);
 static struct request_queue *gscd_queue;
 
index 351a01dd503a3ceea3073f0c6dd31acd82e4c70f..0b0eab4f40fa989dd9c215b089282bc8d8fa106a 100644 (file)
@@ -264,7 +264,7 @@ static inline int flag_low(int flag, unsigned long timeout)
 static int sleep_timeout;      /* max # of ticks to sleep */
 static DECLARE_WAIT_QUEUE_HEAD(waitq);
 static void sleep_timer(unsigned long data);
-static struct timer_list delay_timer = TIMER_INITIALIZER(sleep_timer, 0, 0);
+static DEFINE_TIMER(delay_timer, sleep_timer, 0, 0);
 static DEFINE_SPINLOCK(optcd_lock);
 static struct request_queue *opt_queue;
 
index 452d34675159cd4dbfc6894af5cf7f2b8de19712..30a8977553617c86fb5ec42601ce59dc266811b6 100644 (file)
@@ -742,13 +742,10 @@ static struct sbpcd_drive *current_drive = D_S;
 unsigned long cli_sti; /* for saving the processor flags */
 #endif
 /*==========================================================================*/
-static struct timer_list delay_timer =
-               TIMER_INITIALIZER(mark_timeout_delay, 0, 0);
-static struct timer_list data_timer =
-               TIMER_INITIALIZER(mark_timeout_data, 0, 0);
+static DEFINE_TIMER(delay_timer, mark_timeout_delay, 0, 0);
+static DEFINE_TIMER(data_timer, mark_timeout_data, 0, 0);
 #if 0
-static struct timer_list audio_timer =
-               TIMER_INITIALIZER(mark_timeout_audio, 0, 0);
+static DEFINE_TIMER(audio_timer, mark_timeout_audio, 0, 0);
 #endif
 /*==========================================================================*/
 /*
index 4e7a342ec36ffff10ac0871140317fd4db01d1ff..74b1cadbf161d2adc2f7d61933622bfb8f75bc5e 100644 (file)
@@ -151,7 +151,7 @@ static struct sjcd_stat statistic;
 /*
  * Timer.
  */
-static struct timer_list sjcd_delay_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(sjcd_delay_timer, NULL, 0, 0);
 
 #define SJCD_SET_TIMER( func, tmout )           \
     ( sjcd_delay_timer.expires = jiffies+tmout,         \
index 6a5337bf09368dbd74f0202559e96bcff5067c9b..cf4c3648463dbf8d0cd28c9079be19e110dbefa4 100644 (file)
@@ -865,7 +865,7 @@ static void cyz_poll(unsigned long);
 static long cyz_polling_cycle = CZ_DEF_POLL;
 
 static int cyz_timeron = 0;
-static struct timer_list cyz_timerlist = TIMER_INITIALIZER(cyz_poll, 0, 0);
+static DEFINE_TIMER(cyz_timerlist, cyz_poll, 0, 0);
 
 #else /* CONFIG_CYZ_INTR */
 static void cyz_rx_restart(unsigned long);
index 81d811edf3c58ec478dd73cb239fd2714bb84f32..a54bc93353af1d62d37ddf96af94d344e1bd60e4 100644 (file)
@@ -149,8 +149,7 @@ static unsigned long long hangcheck_tsc, hangcheck_tsc_margin;
 
 static void hangcheck_fire(unsigned long);
 
-static struct timer_list hangcheck_ticktock =
-               TIMER_INITIALIZER(hangcheck_fire, 0, 0);
+static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire, 0, 0);
 
 
 static void hangcheck_fire(unsigned long data)
index 066d7b5cb76d4e14227130659d846f24bd5db0f7..9e4e26aef94ea84d9824c0b61016f78f02bb1884 100644 (file)
@@ -254,7 +254,7 @@ static unsigned long bh_counter = 0;
  * selected, the board is serviced periodically to see if anything needs doing.
  */
 #define  POLL_TIMEOUT   (jiffies + 1)
-static struct timer_list PollTimer = TIMER_INITIALIZER(ip2_poll, 0, 0);
+static DEFINE_TIMER(PollTimer, ip2_poll, 0, 0);
 static char  TimerOn;
 
 #ifdef IP2DEBUG_TRACE
index 52a073eee201d697740fc9cad9530cc38f7e659a..9c19e5435a11faaa33df2a40a39ef2f7a4d06553 100644 (file)
@@ -780,7 +780,7 @@ static struct file_operations       stli_fsiomem = {
  *     much cheaper on host cpu than using interrupts. It turns out to
  *     not increase character latency by much either...
  */
-static struct timer_list stli_timerlist = TIMER_INITIALIZER(stli_poll, 0, 0);
+static DEFINE_TIMER(stli_timerlist, stli_poll, 0, 0);
 
 static int     stli_timeron;
 
index 523fd3c8bbaa75dd345224799990ec0c4f4e5e93..1745065d8f789f062b76fdb1c6a21bb565b0e0f5 100644 (file)
@@ -233,8 +233,7 @@ static void kd_nosound(unsigned long ignored)
        }
 }
 
-static struct timer_list kd_mksound_timer =
-               TIMER_INITIALIZER(kd_nosound, 0, 0);
+static DEFINE_TIMER(kd_mksound_timer, kd_nosound, 0, 0);
 
 void kd_mksound(unsigned int hz, unsigned int ticks)
 {
index c9b301dccec36427caa4262332b261401f11a0bc..7fc2188386d96b56ac062cf4830736a6f6222a79 100644 (file)
@@ -59,7 +59,7 @@ static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */
 
 static int watchdog_port;
 static int mixcomwd_timer_alive;
-static struct timer_list mixcomwd_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(mixcomwd_timer, NULL, 0, 0);
 static char expect_close;
 
 static int nowayout = WATCHDOG_NOWAYOUT;
index 1798ce7262c9b0b0ddea69042646abc5827c8bf8..0095384ff45420c1cd04111fa04ea35a3d365865 100644 (file)
@@ -155,7 +155,7 @@ static int bionet_close(struct net_device *dev);
 static struct net_device_stats *net_get_stats(struct net_device *dev);
 static void bionet_tick(unsigned long);
 
-static struct timer_list bionet_timer = TIMER_INITIALIZER(bionet_tick, 0, 0);
+static DEFINE_TIMER(bionet_timer, bionet_tick, 0, 0);
 
 #define STRAM_ADDR(a)  (((a) & 0xff000000) == 0)
 
index 81c362c8cb973949557550a89e45b45c2268aa3f..8b997809f9de2db86a31a9db66399c7ceb1430a0 100644 (file)
@@ -165,7 +165,7 @@ static void pamsnet_tick(unsigned long);
 
 static irqreturn_t pamsnet_intr(int irq, void *data, struct pt_regs *fp);
 
-static struct timer_list pamsnet_timer = TIMER_INITIALIZER(pamsnet_tick, 0, 0);
+static DEFINE_TIMER(pamsnet_timer, pamsnet_tick, 0, 0);
 
 #define STRAM_ADDR(a)  (((a) & 0xff000000) == 0)
 
index 442670860fca279afb9ef78fdaf79b6a16a493bd..b68b9cad76e9d3952ab998038e77789f9101986f 100644 (file)
@@ -384,8 +384,8 @@ static unsigned int mdio_phy_addr; /* Transciever address */
 static unsigned int network_tr_ctrl_shadow = 0;
 
 /* Network speed indication. */
-static struct timer_list speed_timer = TIMER_INITIALIZER(NULL, 0, 0);
-static struct timer_list clear_led_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(speed_timer, NULL, 0, 0);
+static DEFINE_TIMER(clear_led_timer, NULL, 0, 0);
 static int current_speed; /* Speed read from transceiver */
 static int current_speed_selection; /* Speed selected by user */
 static unsigned long led_next_time;
@@ -393,7 +393,7 @@ static int led_active;
 static int rx_queue_len;
 
 /* Duplex */
-static struct timer_list duplex_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(duplex_timer, NULL, 0, 0);
 static int full_duplex;
 static enum duplex current_duplex;
 
index 41213ef602dc764bad14bb772684289d1b831f07..f52ee3162c51dc29f2ac586be3dfc610fe3363ee 100644 (file)
@@ -170,7 +170,7 @@ static char ax25_bcast[7] =
 static char ax25_test[7] =
 {'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1};
 
-static struct timer_list yam_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(yam_timer, NULL, 0, 0);
 
 /* --------------------------------------------------------------------- */
 
index d96cc47de5668e203cbb49a4d77c85c2d72c1485..672f9f2b21634e93546592f0ed833706a725d09b 100644 (file)
@@ -871,8 +871,7 @@ static irqreturn_t aurora_interrupt(int irq, void * dev_id, struct pt_regs * reg
 #ifdef AURORA_INT_DEBUG
 static void aurora_timer (unsigned long ignored);
 
-static struct timer_list aurora_poll_timer =
-                       TIMER_INITIALIZER(aurora_timer, 0, 0);
+static DEFINE_TIMER(aurora_poll_timer, aurora_timer, 0, 0);
 
 static void
 aurora_timer (unsigned long ignored)
index 623082d3a83f5369d8184be262d9eb1c0404459d..c89da7d5b6dffb49cf9994c7a59540abf8eea5bc 100644 (file)
@@ -95,8 +95,7 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
        int i, retry, nplutos;
        fc_channel *fc;
        Scsi_Device dev;
-       struct timer_list fc_timer =
-               TIMER_INITIALIZER(pluto_detect_timeout, 0, 0);
+       DEFINE_TIMER(fc_timer, pluto_detect_timeout, 0, 0);
 
        tpnt->proc_name = "pluto";
        fcscount = 0;
index 81f8f6b7fdce1aded2ef2ecbc206422e47fb6434..a8267cf17db4685b34da64dd1c4adec99fb5642c 100644 (file)
@@ -178,8 +178,8 @@ static __u8 root_hub_hub_des[] =
        0xff   /*  __u8  PortPwrCtrlMask; *** 7 ports max *** */
 };
 
-static struct timer_list bulk_start_timer = TIMER_INITIALIZER(NULL, 0, 0);
-static struct timer_list bulk_eot_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(bulk_start_timer, NULL, 0, 0);
+static DEFINE_TIMER(bulk_eot_timer, NULL, 0, 0);
 
 /* We want the start timer to expire before the eot timer, because the former might start
    traffic, thus making it unnecessary for the latter to time out. */
index 221f81ac2002b29a454855b918fd106f069413ad..3340f3bd135daa9c4c42741d98df1a6b469e6ba6 100644 (file)
@@ -32,6 +32,10 @@ extern struct timer_base_s __init_timer_base;
                .magic = TIMER_MAGIC,                           \
        }
 
+#define DEFINE_TIMER(_name, _function, _expires, _data)                \
+       struct timer_list _name =                               \
+               TIMER_INITIALIZER(_function, _expires, _data)
+
 void fastcall init_timer(struct timer_list * timer);
 
 /***
index a6329fa8f862da5aea02238c687e93843ba2a80e..0166ea15c9ee8d61f08ddc6e100de841e59205c7 100644 (file)
@@ -368,10 +368,8 @@ int wakeup_pdflush(long nr_pages)
 static void wb_timer_fn(unsigned long unused);
 static void laptop_timer_fn(unsigned long unused);
 
-static struct timer_list wb_timer =
-                       TIMER_INITIALIZER(wb_timer_fn, 0, 0);
-static struct timer_list laptop_mode_wb_timer =
-                       TIMER_INITIALIZER(laptop_timer_fn, 0, 0);
+static DEFINE_TIMER(wb_timer, wb_timer_fn, 0, 0);
+static DEFINE_TIMER(laptop_mode_wb_timer, laptop_timer_fn, 0, 0);
 
 /*
  * Periodic writeback of "old" data.
index 17a81ebe7e6eb0d0a1739c956d14a005c5d45186..526d9531411f5096aff51411115f62e46e1523ad 100644 (file)
@@ -105,7 +105,7 @@ extern void mpc_proc_clean(void);
 
 struct mpoa_client *mpcs = NULL; /* FIXME */
 static struct atm_mpoa_qos *qos_head = NULL;
-static struct timer_list mpc_timer = TIMER_INITIALIZER(NULL, 0, 0);
+static DEFINE_TIMER(mpc_timer, NULL, 0, 0);
 
 
 static struct mpoa_client *find_mpc_by_itfnum(int itf)
index 334790da9f160cd6852a35e5186db16cbb3d14b1..470c05bc4cb2bd513f1ba37002a81f46266c8905 100644 (file)
@@ -39,8 +39,7 @@ static unsigned long dst_gc_timer_inc = DST_GC_MAX;
 static void dst_run_gc(unsigned long);
 static void ___dst_free(struct dst_entry * dst);
 
-static struct timer_list dst_gc_timer =
-       TIMER_INITIALIZER(dst_run_gc, DST_GC_MIN, 0);
+static DEFINE_TIMER(dst_gc_timer, dst_run_gc, DST_GC_MIN, 0);
 
 static void dst_run_gc(unsigned long dummy)
 {
index 2c915f305be37ffef87997ae5fbab5a166103c3b..3407f190afe8892699025bf504c73111a082b8b5 100644 (file)
@@ -117,8 +117,7 @@ static struct dn_rt_hash_bucket *dn_rt_hash_table;
 static unsigned dn_rt_hash_mask;
 
 static struct timer_list dn_route_timer;
-static struct timer_list dn_rt_flush_timer =
-               TIMER_INITIALIZER(dn_run_flush, 0, 0);
+static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush, 0, 0);
 int decnet_dst_gc_interval = 2;
 
 static struct dst_ops dn_dst_ops = {
index f84ba9c96551e015882d9895ac197814c3b769f1..2fc3fd38924f21844bd82841148db79fa491e884 100644 (file)
@@ -100,8 +100,7 @@ DEFINE_SPINLOCK(inet_peer_unused_lock);
 #define PEER_MAX_CLEANUP_WORK 30
 
 static void peer_check_expire(unsigned long dummy);
-static struct timer_list peer_periodic_timer =
-       TIMER_INITIALIZER(peer_check_expire, 0, 0);
+static DEFINE_TIMER(peer_periodic_timer, peer_check_expire, 0, 0);
 
 /* Exported for sysctl_net_ipv4.  */
 int inet_peer_gc_mintime = 10 * HZ,
index 6d6fb74f3b5291bc2639b250f284905c048de30a..2fea3f4402a0e5b0b3c7d2d8703aa6432f1e8dec 100644 (file)
@@ -123,8 +123,7 @@ DEFINE_RWLOCK(addrconf_lock);
 
 static void addrconf_verify(unsigned long);
 
-static struct timer_list addr_chk_timer =
-                       TIMER_INITIALIZER(addrconf_verify, 0, 0);
+static DEFINE_TIMER(addr_chk_timer, addrconf_verify, 0, 0);
 static DEFINE_SPINLOCK(addrconf_verify_lock);
 
 static void addrconf_join_anycast(struct inet6_ifaddr *ifp);
index 16af874c9e8f15e39242b034ae59d8e623ed3e37..4fcc5a7acf6e446ce2715df397d37d78b3b34354 100644 (file)
@@ -92,7 +92,7 @@ static struct fib6_node * fib6_repair_tree(struct fib6_node *fn);
 
 static __u32 rt_sernum;
 
-static struct timer_list ip6_fib_timer = TIMER_INITIALIZER(fib6_run_gc, 0, 0);
+static DEFINE_TIMER(ip6_fib_timer, fib6_run_gc, 0, 0);
 
 struct fib6_walker_t fib6_walker_list = {
        .prev   = &fib6_walker_list,
index a7db762de14a989049f9a817a16730bd1e1f02b9..f841bde30c18493a94fd5d522b84724a8eb82a4a 100644 (file)
@@ -50,7 +50,7 @@ static atomic_t fl_size = ATOMIC_INIT(0);
 static struct ip6_flowlabel *fl_ht[FL_HASH_MASK+1];
 
 static void ip6_fl_gc(unsigned long dummy);
-static struct timer_list ip6_fl_gc_timer = TIMER_INITIALIZER(ip6_fl_gc, 0, 0);
+static DEFINE_TIMER(ip6_fl_gc_timer, ip6_fl_gc, 0, 0);
 
 /* FL hash table lock: it protects only of GC */
 
index 165b2abce1108b1b06b348e9e4cd87dde7466731..e856ae1b360a1e805097f9b409a19b3fb34dd3ca 100644 (file)
@@ -17,7 +17,7 @@
 static void nr_loopback_timer(unsigned long);
 
 static struct sk_buff_head loopback_queue;
-static struct timer_list loopback_timer = TIMER_INITIALIZER(nr_loopback_timer, 0, 0);
+static DEFINE_TIMER(loopback_timer, nr_loopback_timer, 0, 0);
 
 void __init nr_loopback_init(void)
 {
index 737681cb9a928d65800a7e85661b034764683840..31570b9a6e9aa72cca60d1953c14e47938547ebe 100644 (file)
@@ -1194,7 +1194,7 @@ EXPORT_SYMBOL(psched_time_base);
  * with 32-bit get_cycles(). Safe up to 4GHz CPU.
  */
 static void psched_tick(unsigned long);
-static struct timer_list psched_timer = TIMER_INITIALIZER(psched_tick, 0, 0);
+static DEFINE_TIMER(psched_timer, psched_tick, 0, 0);
 
 static void psched_tick(unsigned long dummy)
 {
index b2676fa34630ce621a04059d6482f0c493bb320a..6982556ded56fd352035cd772f53dff5959ce110 100644 (file)
@@ -50,7 +50,7 @@ static struct midi_parms parms[MAX_MIDI_DEV];
 static void midi_poll(unsigned long dummy);
 
 
-static struct timer_list poll_timer = TIMER_INITIALIZER(midi_poll, 0, 0);
+static DEFINE_TIMER(poll_timer, midi_poll, 0, 0);
 
 static volatile int open_devs;
 static DEFINE_SPINLOCK(lock);
index a686be936aff42deb28519f156418762216d1132..95fa81e26de21f395c3e9a13e7fab853728df3df 100644 (file)
@@ -681,8 +681,7 @@ static void do_sequencer_timer(unsigned long dummy)
 }
 
 
-static struct timer_list seq_timer =
-               TIMER_INITIALIZER(do_sequencer_timer, 0, 0);
+static DEFINE_TIMER(seq_timer, do_sequencer_timer, 0, 0);
 
 void request_sound_timer(int count)
 {
index 6afe29b763b747e5b9b4839e35ccddb03b668b91..c9d04518b1722e95e93fc8c832a89f8df4ea084e 100644 (file)
@@ -28,8 +28,7 @@ static unsigned long prev_event_time;
 
 static void     poll_def_tmr(unsigned long dummy);
 static DEFINE_SPINLOCK(lock);
-
-static struct timer_list def_tmr = TIMER_INITIALIZER(poll_def_tmr, 0, 0);
+static DEFINE_TIMER(def_tmr, poll_def_tmr, 0, 0);
 
 static unsigned long
 tmr2ticks(int tmr_value)
index be00cf128651ef60d3e18fb3e7260ed3ede2659a..74ae75f9e2dc40e132a6b5e65a9fd68014698c30 100644 (file)
@@ -78,8 +78,7 @@ static void (*midi_input_intr) (int dev, unsigned char data);
 static void poll_uart6850(unsigned long dummy);
 
 
-static struct timer_list uart6850_timer =
-               TIMER_INITIALIZER(poll_uart6850, 0, 0);
+static DEFINE_TIMER(uart6850_timer, poll_uart6850, 0, 0);
 
 static void uart6850_input_loop(void)
 {