Commit c0542900 authored by Julia Lawall's avatar Julia Lawall Committed by Felipe Balbi

usb: gadget: f_midi: constify snd_rawmidi_ops structures

These snd_rawmidi_ops structures are only passed as the third
argument of snd_rawmidi_set_ops.  This argument is const, so the
snd_rawmidi_ops structures can be const too.

Done with the help of Coccinelle.
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent dfcdcba9
...@@ -755,13 +755,13 @@ static void f_midi_out_trigger(struct snd_rawmidi_substream *substream, int up) ...@@ -755,13 +755,13 @@ static void f_midi_out_trigger(struct snd_rawmidi_substream *substream, int up)
clear_bit(substream->number, &midi->out_triggered); clear_bit(substream->number, &midi->out_triggered);
} }
static struct snd_rawmidi_ops gmidi_in_ops = { static const struct snd_rawmidi_ops gmidi_in_ops = {
.open = f_midi_in_open, .open = f_midi_in_open,
.close = f_midi_in_close, .close = f_midi_in_close,
.trigger = f_midi_in_trigger, .trigger = f_midi_in_trigger,
}; };
static struct snd_rawmidi_ops gmidi_out_ops = { static const struct snd_rawmidi_ops gmidi_out_ops = {
.open = f_midi_out_open, .open = f_midi_out_open,
.close = f_midi_out_close, .close = f_midi_out_close,
.trigger = f_midi_out_trigger .trigger = f_midi_out_trigger
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment