diff options
Diffstat (limited to 'sound/firewire/tascam/tascam-midi.c')
-rw-r--r-- | sound/firewire/tascam/tascam-midi.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/sound/firewire/tascam/tascam-midi.c b/sound/firewire/tascam/tascam-midi.c index 41f842079d9d..df4f95d65925 100644 --- a/sound/firewire/tascam/tascam-midi.c +++ b/sound/firewire/tascam/tascam-midi.c @@ -68,20 +68,18 @@ static void midi_playback_trigger(struct snd_rawmidi_substream *substrm, int up) spin_unlock_irqrestore(&tscm->lock, flags); } -static struct snd_rawmidi_ops midi_capture_ops = { - .open = midi_capture_open, - .close = midi_capture_close, - .trigger = midi_capture_trigger, -}; - -static struct snd_rawmidi_ops midi_playback_ops = { - .open = midi_playback_open, - .close = midi_playback_close, - .trigger = midi_playback_trigger, -}; - int snd_tscm_create_midi_devices(struct snd_tscm *tscm) { + static const struct snd_rawmidi_ops capture_ops = { + .open = midi_capture_open, + .close = midi_capture_close, + .trigger = midi_capture_trigger, + }; + static const struct snd_rawmidi_ops playback_ops = { + .open = midi_playback_open, + .close = midi_playback_close, + .trigger = midi_playback_trigger, + }; struct snd_rawmidi *rmidi; struct snd_rawmidi_str *stream; struct snd_rawmidi_substream *subs; @@ -100,7 +98,7 @@ int snd_tscm_create_midi_devices(struct snd_tscm *tscm) rmidi->info_flags |= SNDRV_RAWMIDI_INFO_INPUT; snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_INPUT, - &midi_capture_ops); + &capture_ops); stream = &rmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT]; /* Set port names for MIDI input. */ @@ -116,7 +114,7 @@ int snd_tscm_create_midi_devices(struct snd_tscm *tscm) rmidi->info_flags |= SNDRV_RAWMIDI_INFO_OUTPUT; snd_rawmidi_set_ops(rmidi, SNDRV_RAWMIDI_STREAM_OUTPUT, - &midi_playback_ops); + &playback_ops); stream = &rmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT]; /* Set port names for MIDI ourput. */ |