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

ALSA: opl3sa2: constify pnp_device_id and pnp_card_device_id

*_device_id are not supposed to change at runtime. All functions
working with *_device_id provided by <linux/pnp.h> work with
const *_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Arvind Yadav and committed by
Takashi Iwai
607b5d7f 05cb183e

+2 -2
+2 -2
sound/isa/opl3sa2.c
··· 141 141 142 142 #ifdef CONFIG_PNP 143 143 144 - static struct pnp_device_id snd_opl3sa2_pnpbiosids[] = { 144 + static const struct pnp_device_id snd_opl3sa2_pnpbiosids[] = { 145 145 { .id = "YMH0021" }, 146 146 { .id = "NMX2210" }, /* Gateway Solo 2500 */ 147 147 { .id = "" } /* end */ ··· 149 149 150 150 MODULE_DEVICE_TABLE(pnp, snd_opl3sa2_pnpbiosids); 151 151 152 - static struct pnp_card_device_id snd_opl3sa2_pnpids[] = { 152 + static const struct pnp_card_device_id snd_opl3sa2_pnpids[] = { 153 153 /* Yamaha YMF719E-S (Genius Sound Maker 3DX) */ 154 154 { .id = "YMH0020", .devs = { { "YMH0021" } } }, 155 155 /* Yamaha OPL3-SA3 (integrated on Intel's Pentium II AL440LX motherboard) */