From: Julia Lawall Date: Tue, 15 Aug 2017 08:09:52 +0000 (+0200) Subject: usb: gadget: f_midi: constify snd_rawmidi_ops structures X-Git-Tag: v4.14-rc1~150^2~31^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c05429005ba906bb88d6e50898d1f64604751dc2;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index a5719f2..71ca86c0 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