You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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>
This commit is contained in:
committed by
Linus Torvalds
parent
7c352bdf04
commit
8d06afab73
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
+4
-10
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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? */
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
/*==========================================================================*/
|
||||
/*
|
||||
|
||||
@@ -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, \
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user