From: Takashi Iwai Date: Thu, 5 Jan 2017 16:30:12 +0000 (+0100) Subject: ALSA: usb: Constify snd_rawmidi_ops X-Git-Tag: v4.11-rc1~100^2~10^2~45 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f43e5407e4184ef0e5a31272f80ca893cb5ee24c;p=karo-tx-linux.git ALSA: usb: Constify snd_rawmidi_ops Now snd_rawmidi_ops is maintained as a const pointer in snd_rawmidi, we can constify the definitions. Reviewed-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- diff --git a/sound/usb/6fire/midi.c b/sound/usb/6fire/midi.c index 3d410969553e..aa5adbb6eb5d 100644 --- a/sound/usb/6fire/midi.c +++ b/sound/usb/6fire/midi.c @@ -139,14 +139,14 @@ static void usb6fire_midi_in_trigger( spin_unlock_irqrestore(&rt->in_lock, flags); } -static struct snd_rawmidi_ops out_ops = { +static const struct snd_rawmidi_ops out_ops = { .open = usb6fire_midi_out_open, .close = usb6fire_midi_out_close, .trigger = usb6fire_midi_out_trigger, .drain = usb6fire_midi_out_drain }; -static struct snd_rawmidi_ops in_ops = { +static const struct snd_rawmidi_ops in_ops = { .open = usb6fire_midi_in_open, .close = usb6fire_midi_in_close, .trigger = usb6fire_midi_in_trigger diff --git a/sound/usb/bcd2000/bcd2000.c b/sound/usb/bcd2000/bcd2000.c index d060dddcc52d..2ff9d578753a 100644 --- a/sound/usb/bcd2000/bcd2000.c +++ b/sound/usb/bcd2000/bcd2000.c @@ -252,13 +252,13 @@ static void bcd2000_input_complete(struct urb *urb) __func__, ret); } -static struct snd_rawmidi_ops bcd2000_midi_output = { +static const struct snd_rawmidi_ops bcd2000_midi_output = { .open = bcd2000_midi_output_open, .close = bcd2000_midi_output_close, .trigger = bcd2000_midi_output_trigger, }; -static struct snd_rawmidi_ops bcd2000_midi_input = { +static const struct snd_rawmidi_ops bcd2000_midi_input = { .open = bcd2000_midi_input_open, .close = bcd2000_midi_input_close, .trigger = bcd2000_midi_input_trigger, diff --git a/sound/usb/caiaq/midi.c b/sound/usb/caiaq/midi.c index 2d7588461b33..f8e5b1b57c4f 100644 --- a/sound/usb/caiaq/midi.c +++ b/sound/usb/caiaq/midi.c @@ -102,14 +102,14 @@ static void snd_usb_caiaq_midi_output_trigger(struct snd_rawmidi_substream *subs } -static struct snd_rawmidi_ops snd_usb_caiaq_midi_output = +static const struct snd_rawmidi_ops snd_usb_caiaq_midi_output = { .open = snd_usb_caiaq_midi_output_open, .close = snd_usb_caiaq_midi_output_close, .trigger = snd_usb_caiaq_midi_output_trigger, }; -static struct snd_rawmidi_ops snd_usb_caiaq_midi_input = +static const struct snd_rawmidi_ops snd_usb_caiaq_midi_input = { .open = snd_usb_caiaq_midi_input_open, .close = snd_usb_caiaq_midi_input_close, diff --git a/sound/usb/line6/midi.c b/sound/usb/line6/midi.c index d0fb2f205bd9..1d3a23b02d68 100644 --- a/sound/usb/line6/midi.c +++ b/sound/usb/line6/midi.c @@ -200,14 +200,14 @@ static void line6_midi_input_trigger(struct snd_rawmidi_substream *substream, line6->line6midi->substream_receive = NULL; } -static struct snd_rawmidi_ops line6_midi_output_ops = { +static const struct snd_rawmidi_ops line6_midi_output_ops = { .open = line6_midi_output_open, .close = line6_midi_output_close, .trigger = line6_midi_output_trigger, .drain = line6_midi_output_drain, }; -static struct snd_rawmidi_ops line6_midi_input_ops = { +static const struct snd_rawmidi_ops line6_midi_input_ops = { .open = line6_midi_input_open, .close = line6_midi_input_close, .trigger = line6_midi_input_trigger, diff --git a/sound/usb/midi.c b/sound/usb/midi.c index 7ba92921bf28..6e763bc8d7db 100644 --- a/sound/usb/midi.c +++ b/sound/usb/midi.c @@ -1234,14 +1234,14 @@ static void snd_usbmidi_input_trigger(struct snd_rawmidi_substream *substream, clear_bit(substream->number, &umidi->input_triggered); } -static struct snd_rawmidi_ops snd_usbmidi_output_ops = { +static const struct snd_rawmidi_ops snd_usbmidi_output_ops = { .open = snd_usbmidi_output_open, .close = snd_usbmidi_output_close, .trigger = snd_usbmidi_output_trigger, .drain = snd_usbmidi_output_drain, }; -static struct snd_rawmidi_ops snd_usbmidi_input_ops = { +static const struct snd_rawmidi_ops snd_usbmidi_input_ops = { .open = snd_usbmidi_input_open, .close = snd_usbmidi_input_close, .trigger = snd_usbmidi_input_trigger