summaryrefslogtreecommitdiffstats
path: root/sound/pci/echoaudio
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-25 08:09:27 -0700
committerTakashi Iwai <tiwai@suse.de>2017-10-26 14:44:59 +0200
commit7211ec6392c8650ebc804023178c245464417ed2 (patch)
treee94c80c2618a50be61994b55372390484dcff456 /sound/pci/echoaudio
parent20e5f8bfb153bdd43b5be194658f8ad814470a5d (diff)
downloadop-kernel-dev-7211ec6392c8650ebc804023178c245464417ed2.zip
op-kernel-dev-7211ec6392c8650ebc804023178c245464417ed2.tar.gz
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 8c685dd..6045a11 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)
-static void snd_echo_midi_output_write(unsigned long data)
+static void snd_echo_midi_output_write(struct timer_list *t)
{
- struct echoaudio *chip = (struct echoaudio *)data;
+ struct echoaudio *chip = from_timer(chip, t, timer);
unsigned long flags;
int bytes, sent, time;
unsigned char buf[MIDI_OUT_BUFFER_SIZE - 1];
@@ -257,8 +257,8 @@ static void snd_echo_midi_output_trigger(struct snd_rawmidi_substream *substream
spin_lock_irq(&chip->lock);
if (up) {
if (!chip->tinuse) {
- setup_timer(&chip->timer, snd_echo_midi_output_write,
- (unsigned long)chip);
+ timer_setup(&chip->timer, snd_echo_midi_output_write,
+ 0);
chip->tinuse = 1;
}
} else {
@@ -273,7 +273,7 @@ static void snd_echo_midi_output_trigger(struct snd_rawmidi_substream *substream
spin_unlock_irq(&chip->lock);
if (up && !chip->midi_full)
- snd_echo_midi_output_write((unsigned long)chip);
+ snd_echo_midi_output_write(&chip->timer);
}
OpenPOWER on IntegriCloud