]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
HID: prodikeys: constify snd_rawmidi_ops structures
authorJulia Lawall <Julia.Lawall@lip6.fr>
Tue, 15 Aug 2017 08:09:53 +0000 (10:09 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 15 Aug 2017 09:02:45 +0000 (11:02 +0200)
This snd_rawmidi_ops structure is only passed as the third
argument of snd_rawmidi_set_ops.  This argument is const, so the
snd_rawmidi_ops structure can be const too.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-prodikeys.c

index f095bf8a3aa94c0a1b6977d4ed41d763548b427e..49c4bd34b3c508259fae68e5714d17d7b0a83b70 100644 (file)
@@ -593,7 +593,7 @@ static void pcmidi_in_trigger(struct snd_rawmidi_substream *substream, int up)
        pm->in_triggered = up;
 }
 
-static struct snd_rawmidi_ops pcmidi_in_ops = {
+static const struct snd_rawmidi_ops pcmidi_in_ops = {
        .open = pcmidi_in_open,
        .close = pcmidi_in_close,
        .trigger = pcmidi_in_trigger