diff mbox

[15/18] ALSA: aica: Use setup_timer() and mod_timer()

Message ID 1421665891-14475-16-git-send-email-tiwai@suse.de (mailing list archive)
State Accepted
Commit da1a39242a946b34cf16a0119a7a3b852b17fef5
Headers show

Commit Message

Takashi Iwai Jan. 19, 2015, 11:11 a.m. UTC
No functional change, refactoring with the standard helpers.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/sh/aica.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index f44dda610ed2..8212300088fc 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -343,11 +343,9 @@  static void spu_begin_dma(struct snd_pcm_substream *substream)
 		mod_timer(&dreamcastcard->timer, jiffies + 4);
 		return;
 	}
-	init_timer(&(dreamcastcard->timer));
-	dreamcastcard->timer.data = (unsigned long) substream;
-	dreamcastcard->timer.function = aica_period_elapsed;
-	dreamcastcard->timer.expires = jiffies + 4;
-	add_timer(&(dreamcastcard->timer));
+	setup_timer(&dreamcastcard->timer, aica_period_elapsed,
+		    (unsigned long) substream);
+	mod_timer(&dreamcastcard->timer, jiffies + 4);
 }
 
 static int snd_aicapcm_pcm_open(struct snd_pcm_substream