[alsa-devel] [PATCH 01/18] ALSA: timer: Use setup_timer() and mod_timer()

Takashi Iwai tiwai at suse.de
Mon Jan 19 12:11:14 CET 2015


No functional change, refactoring with the standard helpers.

Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/core/timer.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/core/timer.c b/sound/core/timer.c
index 777a45e08e53..a44235555896 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1030,9 +1030,7 @@ static int snd_timer_register_system(void)
 		snd_timer_free(timer);
 		return -ENOMEM;
 	}
-	init_timer(&priv->tlist);
-	priv->tlist.function = snd_timer_s_function;
-	priv->tlist.data = (unsigned long) timer;
+	setup_timer(&priv->tlist, snd_timer_s_function, (unsigned long) timer);
 	timer->private_data = priv;
 	timer->private_free = snd_timer_free_system;
 	return snd_timer_global_register(timer);
-- 
2.2.1



More information about the Alsa-devel mailing list