Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[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
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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)
{
+1 −1
Original line number Diff line number Diff line
@@ -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 )
{
+1 −2
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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)
+4 −8
Original line number Diff line number Diff line
@@ -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)
Loading