aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2017-01-05 11:30:12 -0500
committerTakashi Iwai <tiwai@suse.de>2017-01-12 06:50:48 -0500
commitf43e5407e4184ef0e5a31272f80ca893cb5ee24c (patch)
treea2877c89429022881d27b4b09f55fb8326e9ddf9
parent57eb67994a9d117ea81d1580a9163733e26a1fc3 (diff)
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 <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/usb/6fire/midi.c4
-rw-r--r--sound/usb/bcd2000/bcd2000.c4
-rw-r--r--sound/usb/caiaq/midi.c4
-rw-r--r--sound/usb/line6/midi.c4
-rw-r--r--sound/usb/midi.c4
5 files changed, 10 insertions, 10 deletions
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(
139 spin_unlock_irqrestore(&rt->in_lock, flags); 139 spin_unlock_irqrestore(&rt->in_lock, flags);
140} 140}
141 141
142static struct snd_rawmidi_ops out_ops = { 142static const struct snd_rawmidi_ops out_ops = {
143 .open = usb6fire_midi_out_open, 143 .open = usb6fire_midi_out_open,
144 .close = usb6fire_midi_out_close, 144 .close = usb6fire_midi_out_close,
145 .trigger = usb6fire_midi_out_trigger, 145 .trigger = usb6fire_midi_out_trigger,
146 .drain = usb6fire_midi_out_drain 146 .drain = usb6fire_midi_out_drain
147}; 147};
148 148
149static struct snd_rawmidi_ops in_ops = { 149static const struct snd_rawmidi_ops in_ops = {
150 .open = usb6fire_midi_in_open, 150 .open = usb6fire_midi_in_open,
151 .close = usb6fire_midi_in_close, 151 .close = usb6fire_midi_in_close,
152 .trigger = usb6fire_midi_in_trigger 152 .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)
252 __func__, ret); 252 __func__, ret);
253} 253}
254 254
255static struct snd_rawmidi_ops bcd2000_midi_output = { 255static const struct snd_rawmidi_ops bcd2000_midi_output = {
256 .open = bcd2000_midi_output_open, 256 .open = bcd2000_midi_output_open,
257 .close = bcd2000_midi_output_close, 257 .close = bcd2000_midi_output_close,
258 .trigger = bcd2000_midi_output_trigger, 258 .trigger = bcd2000_midi_output_trigger,
259}; 259};
260 260
261static struct snd_rawmidi_ops bcd2000_midi_input = { 261static const struct snd_rawmidi_ops bcd2000_midi_input = {
262 .open = bcd2000_midi_input_open, 262 .open = bcd2000_midi_input_open,
263 .close = bcd2000_midi_input_close, 263 .close = bcd2000_midi_input_close,
264 .trigger = bcd2000_midi_input_trigger, 264 .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
102} 102}
103 103
104 104
105static struct snd_rawmidi_ops snd_usb_caiaq_midi_output = 105static const struct snd_rawmidi_ops snd_usb_caiaq_midi_output =
106{ 106{
107 .open = snd_usb_caiaq_midi_output_open, 107 .open = snd_usb_caiaq_midi_output_open,
108 .close = snd_usb_caiaq_midi_output_close, 108 .close = snd_usb_caiaq_midi_output_close,
109 .trigger = snd_usb_caiaq_midi_output_trigger, 109 .trigger = snd_usb_caiaq_midi_output_trigger,
110}; 110};
111 111
112static struct snd_rawmidi_ops snd_usb_caiaq_midi_input = 112static const struct snd_rawmidi_ops snd_usb_caiaq_midi_input =
113{ 113{
114 .open = snd_usb_caiaq_midi_input_open, 114 .open = snd_usb_caiaq_midi_input_open,
115 .close = snd_usb_caiaq_midi_input_close, 115 .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,
200 line6->line6midi->substream_receive = NULL; 200 line6->line6midi->substream_receive = NULL;
201} 201}
202 202
203static struct snd_rawmidi_ops line6_midi_output_ops = { 203static const struct snd_rawmidi_ops line6_midi_output_ops = {
204 .open = line6_midi_output_open, 204 .open = line6_midi_output_open,
205 .close = line6_midi_output_close, 205 .close = line6_midi_output_close,
206 .trigger = line6_midi_output_trigger, 206 .trigger = line6_midi_output_trigger,
207 .drain = line6_midi_output_drain, 207 .drain = line6_midi_output_drain,
208}; 208};
209 209
210static struct snd_rawmidi_ops line6_midi_input_ops = { 210static const struct snd_rawmidi_ops line6_midi_input_ops = {
211 .open = line6_midi_input_open, 211 .open = line6_midi_input_open,
212 .close = line6_midi_input_close, 212 .close = line6_midi_input_close,
213 .trigger = line6_midi_input_trigger, 213 .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,
1234 clear_bit(substream->number, &umidi->input_triggered); 1234 clear_bit(substream->number, &umidi->input_triggered);
1235} 1235}
1236 1236
1237static struct snd_rawmidi_ops snd_usbmidi_output_ops = { 1237static const struct snd_rawmidi_ops snd_usbmidi_output_ops = {
1238 .open = snd_usbmidi_output_open, 1238 .open = snd_usbmidi_output_open,
1239 .close = snd_usbmidi_output_close, 1239 .close = snd_usbmidi_output_close,
1240 .trigger = snd_usbmidi_output_trigger, 1240 .trigger = snd_usbmidi_output_trigger,
1241 .drain = snd_usbmidi_output_drain, 1241 .drain = snd_usbmidi_output_drain,
1242}; 1242};
1243 1243
1244static struct snd_rawmidi_ops snd_usbmidi_input_ops = { 1244static const struct snd_rawmidi_ops snd_usbmidi_input_ops = {
1245 .open = snd_usbmidi_input_open, 1245 .open = snd_usbmidi_input_open,
1246 .close = snd_usbmidi_input_close, 1246 .close = snd_usbmidi_input_close,
1247 .trigger = snd_usbmidi_input_trigger 1247 .trigger = snd_usbmidi_input_trigger