ALSA: es18xx: constify pnp_device_id and pnp_card_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 17 Aug 2017 10:06:17 +0000 (15:36 +0530)
committerTakashi Iwai <tiwai@suse.de>
Thu, 17 Aug 2017 10:42:15 +0000 (12:42 +0200)
*_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>
sound/isa/es18xx.c

index 77023e4b5d0416b94472b8c5c5263610d1426876..ed66f9feec097c054c13a32d93b94841009f7e90 100644 (file)
@@ -2017,7 +2017,7 @@ static int isa_registered;
 static int pnp_registered;
 static int pnpc_registered;
 
-static struct pnp_device_id snd_audiodrive_pnpbiosids[] = {
+static const struct pnp_device_id snd_audiodrive_pnpbiosids[] = {
        { .id = "ESS1869" },
        { .id = "ESS1879" },
        { .id = "" }            /* end */
@@ -2062,7 +2062,7 @@ static int snd_audiodrive_pnp(int dev, struct snd_es18xx *chip,
        return 0;
 }
 
-static struct pnp_card_device_id snd_audiodrive_pnpids[] = {
+static const struct pnp_card_device_id snd_audiodrive_pnpids[] = {
        /* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */
        { .id = "ESS1868", .devs = { { "ESS1868" }, { "ESS0000" } } },
        /* ESS 1868 (integrated on Maxisound Cards) */