diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2017-06-07 03:38:06 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-06-07 08:55:15 +0300 |
commit | d2dc2a96de9d58038ac1f9ee432e88a70958d59b (patch) | |
tree | b2254a787fa77dd72a313db09a97c9a061ba6cc1 /sound/firewire/fireface/ff-midi.c | |
parent | 875becf8412c60ffae93c5f69e95a4d023f0e8ee (diff) | |
download | linux-d2dc2a96de9d58038ac1f9ee432e88a70958d59b.tar.xz |
ALSA: fireface: constify ALSA specific operations
ALSA fireface driver has ALSA specific operations for MIDI/PCM data.
Structured data for the operations can be constified. Additionally,
The structured data can be function local.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireface/ff-midi.c')
-rw-r--r-- | sound/firewire/fireface/ff-midi.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/sound/firewire/fireface/ff-midi.c b/sound/firewire/fireface/ff-midi.c index 29ee0a7365c3..949ee56b4e0e 100644 --- a/sound/firewire/fireface/ff-midi.c +++ b/sound/firewire/fireface/ff-midi.c @@ -74,18 +74,6 @@ static void midi_playback_trigger(struct snd_rawmidi_substream *substream, spin_unlock_irqrestore(&ff->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, -}; - static void set_midi_substream_names(struct snd_rawmidi_str *stream, const char *const name) { @@ -99,6 +87,16 @@ static void set_midi_substream_names(struct snd_rawmidi_str *stream, int snd_ff_create_midi_devices(struct snd_ff *ff) { + static const struct snd_rawmidi_ops midi_capture_ops = { + .open = midi_capture_open, + .close = midi_capture_close, + .trigger = midi_capture_trigger, + }; + static const struct snd_rawmidi_ops midi_playback_ops = { + .open = midi_playback_open, + .close = midi_playback_close, + .trigger = midi_playback_trigger, + }; struct snd_rawmidi *rmidi; struct snd_rawmidi_str *stream; int err; |