Commit efdbe3c3 authored by Julia Lawall's avatar Julia Lawall Committed by Takashi Iwai

ALSA: midi: constify snd_rawmidi_global_ops structures

The snd_rawmidi_global_ops structures are never modified, so declare them
as const.

Done with the help of Coccinelle.
Signed-off-by: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7a7a2df4
...@@ -130,7 +130,7 @@ struct snd_rawmidi { ...@@ -130,7 +130,7 @@ struct snd_rawmidi {
int ossreg; int ossreg;
#endif #endif
struct snd_rawmidi_global_ops *ops; const struct snd_rawmidi_global_ops *ops;
struct snd_rawmidi_str streams[2]; struct snd_rawmidi_str streams[2];
......
...@@ -468,7 +468,7 @@ static int snd_virmidi_dev_unregister(struct snd_rawmidi *rmidi) ...@@ -468,7 +468,7 @@ static int snd_virmidi_dev_unregister(struct snd_rawmidi *rmidi)
/* /*
* *
*/ */
static struct snd_rawmidi_global_ops snd_virmidi_global_ops = { static const struct snd_rawmidi_global_ops snd_virmidi_global_ops = {
.dev_register = snd_virmidi_dev_register, .dev_register = snd_virmidi_dev_register,
.dev_unregister = snd_virmidi_dev_unregister, .dev_unregister = snd_virmidi_dev_unregister,
}; };
......
...@@ -2206,7 +2206,7 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi *umidi, ...@@ -2206,7 +2206,7 @@ static int snd_usbmidi_create_endpoints_midiman(struct snd_usb_midi *umidi,
return 0; return 0;
} }
static struct snd_rawmidi_global_ops snd_usbmidi_ops = { static const struct snd_rawmidi_global_ops snd_usbmidi_ops = {
.get_port_info = snd_usbmidi_get_port_info, .get_port_info = snd_usbmidi_get_port_info,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment