Commit 8d06afab authored by Ingo Molnar's avatar Ingo Molnar Committed by Linus Torvalds

[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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7c352bdf
...@@ -329,8 +329,7 @@ EXPORT_SYMBOL(get_cmos_time); ...@@ -329,8 +329,7 @@ EXPORT_SYMBOL(get_cmos_time);
static void sync_cmos_clock(unsigned long dummy); static void sync_cmos_clock(unsigned long dummy);
static struct timer_list sync_cmos_timer = static DEFINE_TIMER(sync_cmos_timer, sync_cmos_clock, 0, 0);
TIMER_INITIALIZER(sync_cmos_clock, 0, 0);
static void sync_cmos_clock(unsigned long dummy) static void sync_cmos_clock(unsigned long dummy)
{ {
......
...@@ -63,7 +63,7 @@ void __init amiga_init_sound(void) ...@@ -63,7 +63,7 @@ void __init amiga_init_sound(void)
} }
static void nosound( unsigned long ignored ); 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 ) void amiga_mksound( unsigned int hz, unsigned int ticks )
{ {
......
...@@ -56,8 +56,7 @@ static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int ); ...@@ -56,8 +56,7 @@ static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int );
/* /*
* our timer to start/continue/stop the bell * our timer to start/continue/stop the bell
*/ */
static struct timer_list mac_sound_timer = static DEFINE_TIMER(mac_sound_timer, mac_nosound, 0, 0);
TIMER_INITIALIZER(mac_nosound, 0, 0);
/* /*
* Sort of initialize the sound chip (called from mac_mksound on the first * Sort of initialize the sound chip (called from mac_mksound on the first
......
...@@ -1380,7 +1380,7 @@ static void cs_nosound(unsigned long xx) ...@@ -1380,7 +1380,7 @@ static void cs_nosound(unsigned long xx)
spin_unlock_irqrestore(&cs4218_lock, flags); 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) static void cs_mksound(unsigned int hz, unsigned int ticks)
......
...@@ -376,19 +376,15 @@ static void do_fd_request(request_queue_t *); ...@@ -376,19 +376,15 @@ static void do_fd_request(request_queue_t *);
/************************* End of Prototypes **************************/ /************************* End of Prototypes **************************/
static struct timer_list motor_off_timer = static DEFINE_TIMER(motor_off_timer, fd_motor_off_timer, 0, 0);
TIMER_INITIALIZER(fd_motor_off_timer, 0, 0);
#ifdef TRACKBUFFER #ifdef TRACKBUFFER
static struct timer_list readtrack_timer = static DEFINE_TIMER(readtrack_timer, fd_readtrack_check, 0, 0);
TIMER_INITIALIZER(fd_readtrack_check, 0, 0);
#endif #endif
static struct timer_list timeout_timer = static DEFINE_TIMER(timeout_timer, fd_times_out, 0, 0);
TIMER_INITIALIZER(fd_times_out, 0, 0);
static struct timer_list fd_timer = static DEFINE_TIMER(fd_timer, check_change, 0, 0);
TIMER_INITIALIZER(check_change, 0, 0);
/* DAG: Haven't got a clue what this is? */ /* DAG: Haven't got a clue what this is? */
int stdma_islocked(void) int stdma_islocked(void)
......
...@@ -50,10 +50,8 @@ static void idt77105_stats_timer_func(unsigned long); ...@@ -50,10 +50,8 @@ static void idt77105_stats_timer_func(unsigned long);
static void idt77105_restart_timer_func(unsigned long); static void idt77105_restart_timer_func(unsigned long);
static struct timer_list stats_timer = static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func, 0, 0);
TIMER_INITIALIZER(idt77105_stats_timer_func, 0, 0); static DEFINE_TIMER(restart_timer, idt77105_restart_timer_func, 0, 0);
static struct timer_list restart_timer =
TIMER_INITIALIZER(idt77105_restart_timer_func, 0, 0);
static int start_timer = 1; static int start_timer = 1;
static struct idt77105_priv *idt77105_all = NULL; static struct idt77105_priv *idt77105_all = NULL;
......
...@@ -79,7 +79,7 @@ static IADEV *ia_dev[8]; ...@@ -79,7 +79,7 @@ static IADEV *ia_dev[8];
static struct atm_dev *_ia_dev[8]; static struct atm_dev *_ia_dev[8];
static int iadev_count; static int iadev_count;
static void ia_led_timer(unsigned long arg); 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_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 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 static uint IADebugFlag = /* IF_IADBG_ERR | IF_IADBG_CBR| IF_IADBG_INIT_ADAPTER
......
...@@ -371,7 +371,7 @@ static int acsi_revalidate (struct gendisk *disk); ...@@ -371,7 +371,7 @@ static int acsi_revalidate (struct gendisk *disk);
/************************* End of Prototypes **************************/ /************************* 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 #ifdef CONFIG_ATARI_SLM
......
...@@ -268,7 +268,7 @@ static int slm_get_pagesize( int device, int *w, int *h ); ...@@ -268,7 +268,7 @@ static int slm_get_pagesize( int device, int *w, int *h );
/************************* End of Prototypes **************************/ /************************* 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 = { static struct file_operations slm_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
...@@ -371,16 +371,10 @@ static int floppy_release( struct inode * inode, struct file * filp ); ...@@ -371,16 +371,10 @@ static int floppy_release( struct inode * inode, struct file * filp );
/************************* End of Prototypes **************************/ /************************* End of Prototypes **************************/
static struct timer_list motor_off_timer = static DEFINE_TIMER(motor_off_timer, fd_motor_off_timer, 0, 0);
TIMER_INITIALIZER(fd_motor_off_timer, 0, 0); static DEFINE_TIMER(readtrack_timer, fd_readtrack_check, 0, 0);
static struct timer_list readtrack_timer = static DEFINE_TIMER(timeout_timer, fd_times_out, 0, 0);
TIMER_INITIALIZER(fd_readtrack_check, 0, 0); static DEFINE_TIMER(fd_timer, check_change, 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 inline void start_motor_off_timer(void) static inline void start_motor_off_timer(void)
{ {
......
...@@ -628,7 +628,7 @@ static inline void debugt(const char *message) { } ...@@ -628,7 +628,7 @@ static inline void debugt(const char *message) { }
#endif /* DEBUGT */ #endif /* DEBUGT */
typedef void (*timeout_fn) (unsigned long); 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; static const char *timeout_message;
...@@ -1012,7 +1012,7 @@ static void schedule_bh(void (*handler) (void)) ...@@ -1012,7 +1012,7 @@ static void schedule_bh(void (*handler) (void))
schedule_work(&floppy_work); 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) static void cancel_activity(void)
{ {
......
...@@ -99,8 +99,7 @@ static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_int); ...@@ -99,8 +99,7 @@ static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_int);
static int no_int_yet; static int no_int_yet;
static int ps2esdi_drives; static int ps2esdi_drives;
static u_short io_base; static u_short io_base;
static struct timer_list esdi_timer = static DEFINE_TIMER(esdi_timer, ps2esdi_reset_timer, 0, 0);
TIMER_INITIALIZER(ps2esdi_reset_timer, 0, 0);
static int reset_status; static int reset_status;
static int ps2esdi_slot = -1; static int ps2esdi_slot = -1;
static int tp720esdi = 0; /* Is it Integrated ESDI of ThinkPad-720? */ static int tp720esdi = 0; /* Is it Integrated ESDI of ThinkPad-720? */
......
...@@ -297,7 +297,7 @@ static char azt_auto_eject = AZT_AUTO_EJECT; ...@@ -297,7 +297,7 @@ static char azt_auto_eject = AZT_AUTO_EJECT;
static int AztTimeout, AztTries; static int AztTimeout, AztTries;
static DECLARE_WAIT_QUEUE_HEAD(azt_waitq); 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_DiskInfo DiskInfo;
static struct azt_Toc Toc[MAX_TRACKS]; static struct azt_Toc Toc[MAX_TRACKS];
......
...@@ -146,7 +146,7 @@ static int AudioStart_f; ...@@ -146,7 +146,7 @@ static int AudioStart_f;
static int AudioEnd_m; static int AudioEnd_m;
static int AudioEnd_f; 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 DEFINE_SPINLOCK(gscd_lock);
static struct request_queue *gscd_queue; static struct request_queue *gscd_queue;
......
...@@ -264,7 +264,7 @@ static inline int flag_low(int flag, unsigned long timeout) ...@@ -264,7 +264,7 @@ static inline int flag_low(int flag, unsigned long timeout)
static int sleep_timeout; /* max # of ticks to sleep */ static int sleep_timeout; /* max # of ticks to sleep */
static DECLARE_WAIT_QUEUE_HEAD(waitq); static DECLARE_WAIT_QUEUE_HEAD(waitq);
static void sleep_timer(unsigned long data); 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 DEFINE_SPINLOCK(optcd_lock);
static struct request_queue *opt_queue; static struct request_queue *opt_queue;
......
...@@ -742,13 +742,10 @@ static struct sbpcd_drive *current_drive = D_S; ...@@ -742,13 +742,10 @@ static struct sbpcd_drive *current_drive = D_S;
unsigned long cli_sti; /* for saving the processor flags */ unsigned long cli_sti; /* for saving the processor flags */
#endif #endif
/*==========================================================================*/ /*==========================================================================*/
static struct timer_list delay_timer = static DEFINE_TIMER(delay_timer, mark_timeout_delay, 0, 0);
TIMER_INITIALIZER(mark_timeout_delay, 0, 0); static DEFINE_TIMER(data_timer, mark_timeout_data, 0, 0);
static struct timer_list data_timer =
TIMER_INITIALIZER(mark_timeout_data, 0, 0);
#if 0 #if 0
static struct timer_list audio_timer = static DEFINE_TIMER(audio_timer, mark_timeout_audio, 0, 0);
TIMER_INITIALIZER(mark_timeout_audio, 0, 0);
#endif #endif
/*==========================================================================*/ /*==========================================================================*/
/* /*
......
...@@ -151,7 +151,7 @@ static struct sjcd_stat statistic; ...@@ -151,7 +151,7 @@ static struct sjcd_stat statistic;
/* /*
* Timer. * 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 ) \ #define SJCD_SET_TIMER( func, tmout ) \
( sjcd_delay_timer.expires = jiffies+tmout, \ ( sjcd_delay_timer.expires = jiffies+tmout, \
......
...@@ -865,7 +865,7 @@ static void cyz_poll(unsigned long); ...@@ -865,7 +865,7 @@ static void cyz_poll(unsigned long);
static long cyz_polling_cycle = CZ_DEF_POLL; static long cyz_polling_cycle = CZ_DEF_POLL;
static int cyz_timeron = 0; 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 */ #else /* CONFIG_CYZ_INTR */
static void cyz_rx_restart(unsigned long); static void cyz_rx_restart(unsigned long);
......
...@@ -149,8 +149,7 @@ static unsigned long long hangcheck_tsc, hangcheck_tsc_margin; ...@@ -149,8 +149,7 @@ static unsigned long long hangcheck_tsc, hangcheck_tsc_margin;
static void hangcheck_fire(unsigned long); static void hangcheck_fire(unsigned long);
static struct timer_list hangcheck_ticktock = static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire, 0, 0);
TIMER_INITIALIZER(hangcheck_fire, 0, 0);
static void hangcheck_fire(unsigned long data) static void hangcheck_fire(unsigned long data)
......
...@@ -254,7 +254,7 @@ static unsigned long bh_counter = 0; ...@@ -254,7 +254,7 @@ static unsigned long bh_counter = 0;
* selected, the board is serviced periodically to see if anything needs doing. * selected, the board is serviced periodically to see if anything needs doing.
*/ */
#define POLL_TIMEOUT (jiffies + 1) #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; static char TimerOn;
#ifdef IP2DEBUG_TRACE #ifdef IP2DEBUG_TRACE
......
...@@ -780,7 +780,7 @@ static struct file_operations stli_fsiomem = { ...@@ -780,7 +780,7 @@ static struct file_operations stli_fsiomem = {
* much cheaper on host cpu than using interrupts. It turns out to * much cheaper on host cpu than using interrupts. It turns out to
* not increase character latency by much either... * 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; static int stli_timeron;
......
...@@ -233,8 +233,7 @@ static void kd_nosound(unsigned long ignored) ...@@ -233,8 +233,7 @@ static void kd_nosound(unsigned long ignored)
} }
} }
static struct timer_list kd_mksound_timer = static DEFINE_TIMER(kd_mksound_timer, kd_nosound, 0, 0);
TIMER_INITIALIZER(kd_nosound, 0, 0);
void kd_mksound(unsigned int hz, unsigned int ticks) void kd_mksound(unsigned int hz, unsigned int ticks)
{ {
......
...@@ -59,7 +59,7 @@ static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */ ...@@ -59,7 +59,7 @@ static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */
static int watchdog_port; static int watchdog_port;
static int mixcomwd_timer_alive; 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 char expect_close;
static int nowayout = WATCHDOG_NOWAYOUT; static int nowayout = WATCHDOG_NOWAYOUT;
......
...@@ -155,7 +155,7 @@ static int bionet_close(struct net_device *dev); ...@@ -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 struct net_device_stats *net_get_stats(struct net_device *dev);
static void bionet_tick(unsigned long); 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) #define STRAM_ADDR(a) (((a) & 0xff000000) == 0)
......
...@@ -165,7 +165,7 @@ static void pamsnet_tick(unsigned long); ...@@ -165,7 +165,7 @@ static void pamsnet_tick(unsigned long);
static irqreturn_t pamsnet_intr(int irq, void *data, struct pt_regs *fp); 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) #define STRAM_ADDR(a) (((a) & 0xff000000) == 0)
......
...@@ -384,8 +384,8 @@ static unsigned int mdio_phy_addr; /* Transciever address */ ...@@ -384,8 +384,8 @@ static unsigned int mdio_phy_addr; /* Transciever address */
static unsigned int network_tr_ctrl_shadow = 0; static unsigned int network_tr_ctrl_shadow = 0;
/* Network speed indication. */ /* Network speed indication. */
static struct timer_list speed_timer = TIMER_INITIALIZER(NULL, 0, 0); static DEFINE_TIMER(speed_timer, NULL, 0, 0);
static struct timer_list clear_led_timer = TIMER_INITIALIZER(NULL, 0, 0); static DEFINE_TIMER(clear_led_timer, NULL, 0, 0);
static int current_speed; /* Speed read from transceiver */ static int current_speed; /* Speed read from transceiver */
static int current_speed_selection; /* Speed selected by user */ static int current_speed_selection; /* Speed selected by user */
static unsigned long led_next_time; static unsigned long led_next_time;
...@@ -393,7 +393,7 @@ static int led_active; ...@@ -393,7 +393,7 @@ static int led_active;
static int rx_queue_len; static int rx_queue_len;
/* Duplex */ /* 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 int full_duplex;
static enum duplex current_duplex; static enum duplex current_duplex;
......
...@@ -170,7 +170,7 @@ static char ax25_bcast[7] = ...@@ -170,7 +170,7 @@ static char ax25_bcast[7] =
static char ax25_test[7] = static char ax25_test[7] =
{'L' << 1, 'I' << 1, 'N' << 1, 'U' << 1, 'X' << 1, ' ' << 1, '1' << 1}; {'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);
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
......
...@@ -871,8 +871,7 @@ static irqreturn_t aurora_interrupt(int irq, void * dev_id, struct pt_regs * reg ...@@ -871,8 +871,7 @@ static irqreturn_t aurora_interrupt(int irq, void * dev_id, struct pt_regs * reg
#ifdef AURORA_INT_DEBUG #ifdef AURORA_INT_DEBUG
static void aurora_timer (unsigned long ignored); static void aurora_timer (unsigned long ignored);
static struct timer_list aurora_poll_timer = static DEFINE_TIMER(aurora_poll_timer, aurora_timer, 0, 0);
TIMER_INITIALIZER(aurora_timer, 0, 0);
static void static void
aurora_timer (unsigned long ignored) aurora_timer (unsigned long ignored)
......
...@@ -95,8 +95,7 @@ int __init pluto_detect(Scsi_Host_Template *tpnt) ...@@ -95,8 +95,7 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
int i, retry, nplutos; int i, retry, nplutos;
fc_channel *fc; fc_channel *fc;
Scsi_Device dev; Scsi_Device dev;
struct timer_list fc_timer = DEFINE_TIMER(fc_timer, pluto_detect_timeout, 0, 0);
TIMER_INITIALIZER(pluto_detect_timeout, 0, 0);
tpnt->proc_name = "pluto"; tpnt->proc_name = "pluto";
fcscount = 0; fcscount = 0;
......
...@@ -178,8 +178,8 @@ static __u8 root_hub_hub_des[] = ...@@ -178,8 +178,8 @@ static __u8 root_hub_hub_des[] =
0xff /* __u8 PortPwrCtrlMask; *** 7 ports max *** */ 0xff /* __u8 PortPwrCtrlMask; *** 7 ports max *** */
}; };
static struct timer_list bulk_start_timer = TIMER_INITIALIZER(NULL, 0, 0); static DEFINE_TIMER(bulk_start_timer, NULL, 0, 0);
static struct timer_list bulk_eot_timer = TIMER_INITIALIZER(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 /* 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. */ traffic, thus making it unnecessary for the latter to time out. */
......
...@@ -32,6 +32,10 @@ extern struct timer_base_s __init_timer_base; ...@@ -32,6 +32,10 @@ extern struct timer_base_s __init_timer_base;
.magic = TIMER_MAGIC, \ .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); void fastcall init_timer(struct timer_list * timer);
/*** /***
......
...@@ -368,10 +368,8 @@ int wakeup_pdflush(long nr_pages) ...@@ -368,10 +368,8 @@ int wakeup_pdflush(long nr_pages)
static void wb_timer_fn(unsigned long unused); static void wb_timer_fn(unsigned long unused);
static void laptop_timer_fn(unsigned long unused); static void laptop_timer_fn(unsigned long unused);
static struct timer_list wb_timer = static DEFINE_TIMER(wb_timer, wb_timer_fn, 0, 0);
TIMER_INITIALIZER(wb_timer_fn, 0, 0); static DEFINE_TIMER(laptop_mode_wb_timer, laptop_timer_fn, 0, 0);
static struct timer_list laptop_mode_wb_timer =
TIMER_INITIALIZER(laptop_timer_fn, 0, 0);
/* /*
* Periodic writeback of "old" data. * Periodic writeback of "old" data.
......
...@@ -105,7 +105,7 @@ extern void mpc_proc_clean(void); ...@@ -105,7 +105,7 @@ extern void mpc_proc_clean(void);
struct mpoa_client *mpcs = NULL; /* FIXME */ struct mpoa_client *mpcs = NULL; /* FIXME */
static struct atm_mpoa_qos *qos_head = NULL; 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) static struct mpoa_client *find_mpc_by_itfnum(int itf)
......
...@@ -39,8 +39,7 @@ static unsigned long dst_gc_timer_inc = DST_GC_MAX; ...@@ -39,8 +39,7 @@ static unsigned long dst_gc_timer_inc = DST_GC_MAX;
static void dst_run_gc(unsigned long); static void dst_run_gc(unsigned long);
static void ___dst_free(struct dst_entry * dst); static void ___dst_free(struct dst_entry * dst);
static struct timer_list dst_gc_timer = static DEFINE_TIMER(dst_gc_timer, dst_run_gc, DST_GC_MIN, 0);
TIMER_INITIALIZER(dst_run_gc, DST_GC_MIN, 0);
static void dst_run_gc(unsigned long dummy) static void dst_run_gc(unsigned long dummy)
{ {
......
...@@ -117,8 +117,7 @@ static struct dn_rt_hash_bucket *dn_rt_hash_table; ...@@ -117,8 +117,7 @@ static struct dn_rt_hash_bucket *dn_rt_hash_table;
static unsigned dn_rt_hash_mask; static unsigned dn_rt_hash_mask;
static struct timer_list dn_route_timer; static struct timer_list dn_route_timer;