Skip to content

Commit 0acb310

Browse files
JuliaLawallJiri Kosina
authored andcommitted
HID: prodikeys: constify snd_rawmidi_ops structures
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 81b7ec4 commit 0acb310

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-prodikeys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ static void pcmidi_in_trigger(struct snd_rawmidi_substream *substream, int up)
593593
pm->in_triggered = up;
594594
}
595595

596-
static struct snd_rawmidi_ops pcmidi_in_ops = {
596+
static const struct snd_rawmidi_ops pcmidi_in_ops = {
597597
.open = pcmidi_in_open,
598598
.close = pcmidi_in_close,
599599
.trigger = pcmidi_in_trigger

0 commit comments

Comments
 (0)