summaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-25 11:09:27 -0400
committerTakashi Iwai <tiwai@suse.de>2017-10-26 08:44:59 -0400
commit7211ec6392c8650ebc804023178c245464417ed2 (patch)
treee94c80c2618a50be61994b55372390484dcff456 /sound/pci/echoaudio
parent20e5f8bfb153bdd43b5be194658f8ad814470a5d (diff)
ALSA: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. These are all the "mechanical" changes remaining in the sound subsystem. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/echoaudio')
-rw-r--r--sound/pci/echoaudio/midi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/pci/echoaudio/midi.c b/sound/pci/echoaudio/midi.c
index 8c685ddb1a41..6045a115cffe 100644
--- a/sound/pci/echoaudio/midi.c
+++ b/sound/pci/echoaudio/midi.c
@@ -199,9 +199,9 @@ static int snd_echo_midi_output_open(struct snd_rawmidi_substream *substream)
199 199
200 200
201 201
202static void snd_echo_midi_output_write(unsigned long data) 202static void snd_echo_midi_output_write(struct timer_list *t)
203{ 203{
204 struct echoaudio *chip = (struct echoaudio *)data; 204 struct echoaudio *chip = from_timer(chip, t, timer);
205 unsigned long flags; 205 unsigned long flags;
206 int bytes, sent, time; 206 int bytes, sent, time;
207 unsigned char buf[MIDI_OUT_BUFFER_SIZE - 1]; 207 unsigned char buf[MIDI_OUT_BUFFER_SIZE - 1];
@@ -257,8 +257,8 @@ static void snd_echo_midi_output_trigger(struct snd_rawmidi_substream *substream
257 spin_lock_irq(&chip->lock); 257 spin_lock_irq(&chip->lock);
258 if (up) { 258 if (up) {
259 if (!chip->tinuse) { 259 if (!chip->tinuse) {
260 setup_timer(&chip->timer, snd_echo_midi_output_write, 260 timer_setup(&chip->timer, snd_echo_midi_output_write,
261 (unsigned long)chip); 261 0);
262 chip->tinuse = 1; 262 chip->tinuse = 1;
263 } 263 }
264 } else { 264 } else {
@@ -273,7 +273,7 @@ static void snd_echo_midi_output_trigger(struct snd_rawmidi_substream *substream
273 spin_unlock_irq(&chip->lock); 273 spin_unlock_irq(&chip->lock);
274 274
275 if (up && !chip->midi_full) 275 if (up && !chip->midi_full)
276 snd_echo_midi_output_write((unsigned long)chip); 276 snd_echo_midi_output_write(&chip->timer);
277} 277}
278 278
279 279