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

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


No functional change, refactoring with the standard helpers.

Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
 sound/pci/echoaudio/midi.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sound/pci/echoaudio/midi.c b/sound/pci/echoaudio/midi.c
index d913749d154a..a8fe58335ddc 100644
--- a/sound/pci/echoaudio/midi.c
+++ b/sound/pci/echoaudio/midi.c
@@ -257,9 +257,8 @@ static void snd_echo_midi_output_trigger(struct snd_rawmidi_substream *substream
 	spin_lock_irq(&chip->lock);
 	if (up) {
 		if (!chip->tinuse) {
-			init_timer(&chip->timer);
-			chip->timer.function = snd_echo_midi_output_write;
-			chip->timer.data = (unsigned long)chip;
+			setup_timer(&chip->timer, snd_echo_midi_output_write,
+				    (unsigned long)chip);
 			chip->tinuse = 1;
 		}
 	} else {
-- 
2.2.1



More information about the Alsa-devel mailing list