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

Commit 24ed960a authored by Kees Cook's avatar Kees Cook
Browse files

treewide: Switch DEFINE_TIMER callbacks to struct timer_list *



This changes all DEFINE_TIMER() callbacks to use a struct timer_list
pointer instead of unsigned long. Since the data argument has already been
removed, none of these callbacks are using their argument currently, so
this renames the argument to "unused".

Done using the following semantic patch:

@match_define_timer@
declarer name DEFINE_TIMER;
identifier _timer, _callback;
@@

 DEFINE_TIMER(_timer, _callback);

@change_callback depends on match_define_timer@
identifier match_define_timer._callback;
type _origtype;
identifier _origarg;
@@

 void
-_callback(_origtype _origarg)
+_callback(struct timer_list *unused)
 { ... }

Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 6cc73a06
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -179,10 +179,10 @@ static int power_button_countdown;
/* Must hold the button down for at least this many counts to be processed */
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */

static void dsmg600_power_handler(unsigned long data);
static void dsmg600_power_handler(struct timer_list *unused);
static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler);

static void dsmg600_power_handler(unsigned long data)
static void dsmg600_power_handler(struct timer_list *unused)
{
	/* This routine is called twice per second to check the
	 * state of the power button.
+2 −2
Original line number Diff line number Diff line
@@ -202,10 +202,10 @@ static int power_button_countdown;
/* Must hold the button down for at least this many counts to be processed */
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */

static void nas100d_power_handler(unsigned long data);
static void nas100d_power_handler(struct timer_list *unused);
static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler);

static void nas100d_power_handler(unsigned long data)
static void nas100d_power_handler(struct timer_list *unused)
{
	/* This routine is called twice per second to check the
	 * state of the power button.
+2 −2
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ void __init amiga_init_sound(void)
#endif
}

static void nosound( unsigned long ignored );
static void nosound(struct timer_list *unused);
static DEFINE_TIMER(sound_timer, nosound);

void amiga_mksound( unsigned int hz, unsigned int ticks )
@@ -107,7 +107,7 @@ void amiga_mksound( unsigned int hz, unsigned int ticks )
}


static void nosound( unsigned long ignored )
static void nosound(struct timer_list *unused)
{
	/* turn off DMA for audio channel 2 */
	custom.dmacon = DMAF_AUD2;
+2 −2
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ static unsigned long mac_bell_phasepersample;
 * some function protos
 */
static void mac_init_asc( void );
static void mac_nosound( unsigned long );
static void mac_nosound(struct timer_list *);
static void mac_quadra_start_bell( unsigned int, unsigned int, unsigned int );
static void mac_quadra_ring_bell( unsigned long );
static void mac_av_start_bell( unsigned int, unsigned int, unsigned int );
@@ -216,7 +216,7 @@ void mac_mksound( unsigned int freq, unsigned int length )
/*
 * regular ASC: stop whining ..
 */
static void mac_nosound( unsigned long ignored )
static void mac_nosound(struct timer_list *unused)
{
	mac_asc_regs[ ASC_ENABLE ] = 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -36,10 +36,10 @@ void mips_display_message(const char *str)
	}
}

static void scroll_display_message(unsigned long unused);
static void scroll_display_message(struct timer_list *unused);
static DEFINE_TIMER(mips_scroll_timer, scroll_display_message);

static void scroll_display_message(unsigned long unused)
static void scroll_display_message(struct timer_list *unused)
{
	mips_display_message(&display_string[display_count++]);
	if (display_count == max_display_count)
Loading