diff options
author | Julia Lawall <Julia.Lawall@lip6.fr> | 2017-08-15 10:09:52 +0200 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-08-15 12:46:04 +0300 |
commit | c05429005ba906bb88d6e50898d1f64604751dc2 (patch) | |
tree | 6b8363e1c4f5d7ed039c697e2300ba91fa9b3aa6 /drivers/usb/gadget/function/f_midi.c | |
parent | dfcdcba9e30d23db0cbaae4828b0566a927e2489 (diff) | |
download | blackbird-op-linux-c05429005ba906bb88d6e50898d1f64604751dc2.tar.gz blackbird-op-linux-c05429005ba906bb88d6e50898d1f64604751dc2.zip |
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: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/gadget/function/f_midi.c')
-rw-r--r-- | drivers/usb/gadget/function/f_midi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index a5719f271bf0..71ca86c0d772 100644 --- a/drivers/usb/gadget/function/f_midi.c +++ b/drivers/usb/gadget/function/f_midi.c @@ -755,13 +755,13 @@ static void f_midi_out_trigger(struct snd_rawmidi_substream *substream, int up) 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, .close = f_midi_in_close, .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, .close = f_midi_out_close, .trigger = f_midi_out_trigger |