Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: firewire: 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>

+16 -16
+2 -2
sound/firewire/bebob/bebob_midi.c
··· 120 120 121 121 int snd_bebob_create_midi_devices(struct snd_bebob *bebob) 122 122 { 123 - static struct snd_rawmidi_ops capture_ops = { 123 + static const struct snd_rawmidi_ops capture_ops = { 124 124 .open = midi_capture_open, 125 125 .close = midi_capture_close, 126 126 .trigger = midi_capture_trigger, 127 127 }; 128 - static struct snd_rawmidi_ops playback_ops = { 128 + static const struct snd_rawmidi_ops playback_ops = { 129 129 .open = midi_playback_open, 130 130 .close = midi_playback_close, 131 131 .trigger = midi_playback_trigger,
+2 -2
sound/firewire/dice/dice-midi.c
··· 91 91 92 92 int snd_dice_create_midi(struct snd_dice *dice) 93 93 { 94 - static struct snd_rawmidi_ops capture_ops = { 94 + static const struct snd_rawmidi_ops capture_ops = { 95 95 .open = midi_open, 96 96 .close = midi_close, 97 97 .trigger = midi_capture_trigger, 98 98 }; 99 - static struct snd_rawmidi_ops playback_ops = { 99 + static const struct snd_rawmidi_ops playback_ops = { 100 100 .open = midi_open, 101 101 .close = midi_close, 102 102 .trigger = midi_playback_trigger,
+4 -4
sound/firewire/digi00x/digi00x-midi.c
··· 148 148 149 149 int snd_dg00x_create_midi_devices(struct snd_dg00x *dg00x) 150 150 { 151 - static struct snd_rawmidi_ops phys_capture_ops = { 151 + static const struct snd_rawmidi_ops phys_capture_ops = { 152 152 .open = midi_phys_open, 153 153 .close = midi_phys_close, 154 154 .trigger = midi_phys_capture_trigger, 155 155 }; 156 - static struct snd_rawmidi_ops phys_playback_ops = { 156 + static const struct snd_rawmidi_ops phys_playback_ops = { 157 157 .open = midi_phys_open, 158 158 .close = midi_phys_close, 159 159 .trigger = midi_phys_playback_trigger, 160 160 }; 161 - static struct snd_rawmidi_ops ctl_capture_ops = { 161 + static const struct snd_rawmidi_ops ctl_capture_ops = { 162 162 .open = midi_ctl_open, 163 163 .close = midi_ctl_capture_close, 164 164 .trigger = midi_ctl_capture_trigger, 165 165 }; 166 - static struct snd_rawmidi_ops ctl_playback_ops = { 166 + static const struct snd_rawmidi_ops ctl_playback_ops = { 167 167 .open = midi_ctl_open, 168 168 .close = midi_ctl_playback_close, 169 169 .trigger = midi_ctl_playback_trigger,
+2 -2
sound/firewire/fireworks/fireworks_midi.c
··· 120 120 121 121 int snd_efw_create_midi_devices(struct snd_efw *efw) 122 122 { 123 - static struct snd_rawmidi_ops capture_ops = { 123 + static const struct snd_rawmidi_ops capture_ops = { 124 124 .open = midi_capture_open, 125 125 .close = midi_capture_close, 126 126 .trigger = midi_capture_trigger, 127 127 }; 128 - static struct snd_rawmidi_ops playback_ops = { 128 + static const struct snd_rawmidi_ops playback_ops = { 129 129 .open = midi_playback_open, 130 130 .close = midi_playback_close, 131 131 .trigger = midi_playback_trigger,
+2 -2
sound/firewire/oxfw/oxfw-midi.c
··· 130 130 131 131 int snd_oxfw_create_midi(struct snd_oxfw *oxfw) 132 132 { 133 - static struct snd_rawmidi_ops capture_ops = { 133 + static const struct snd_rawmidi_ops capture_ops = { 134 134 .open = midi_capture_open, 135 135 .close = midi_capture_close, 136 136 .trigger = midi_capture_trigger, 137 137 }; 138 - static struct snd_rawmidi_ops playback_ops = { 138 + static const struct snd_rawmidi_ops playback_ops = { 139 139 .open = midi_playback_open, 140 140 .close = midi_playback_close, 141 141 .trigger = midi_playback_trigger,
+2 -2
sound/firewire/oxfw/oxfw-scs1x.c
··· 297 297 } 298 298 } 299 299 300 - static struct snd_rawmidi_ops midi_capture_ops = { 300 + static const struct snd_rawmidi_ops midi_capture_ops = { 301 301 .open = midi_capture_open, 302 302 .close = midi_capture_close, 303 303 .trigger = midi_capture_trigger, ··· 338 338 wait_event(scs->idle_wait, scs->output_idle); 339 339 } 340 340 341 - static struct snd_rawmidi_ops midi_playback_ops = { 341 + static const struct snd_rawmidi_ops midi_playback_ops = { 342 342 .open = midi_playback_open, 343 343 .close = midi_playback_close, 344 344 .trigger = midi_playback_trigger,
+2 -2
sound/firewire/tascam/tascam-midi.c
··· 70 70 71 71 int snd_tscm_create_midi_devices(struct snd_tscm *tscm) 72 72 { 73 - static struct snd_rawmidi_ops capture_ops = { 73 + static const struct snd_rawmidi_ops capture_ops = { 74 74 .open = midi_capture_open, 75 75 .close = midi_capture_close, 76 76 .trigger = midi_capture_trigger, 77 77 }; 78 - static struct snd_rawmidi_ops playback_ops = { 78 + static const struct snd_rawmidi_ops playback_ops = { 79 79 .open = midi_playback_open, 80 80 .close = midi_playback_close, 81 81 .trigger = midi_playback_trigger,