From: Julia Lawall Date: Tue, 15 Aug 2017 08:09:53 +0000 (+0200) Subject: HID: prodikeys: constify snd_rawmidi_ops structures X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0acb310c3273d55ad19c9a5f48b73224ce6e2dc0;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-prodikeys.c b/drivers/hid/hid-prodikeys.c index f095bf8a3aa9..49c4bd34b3c5 100644 --- a/drivers/hid/hid-prodikeys.c +++ b/drivers/hid/hid-prodikeys.c @@ -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