From: Takashi Iwai <tiwai@suse.de> To: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 58/58] ALSA: pci: Constify snd_pci_quirk tables Date: Fri, 3 Jan 2020 09:17:14 +0100 Message-ID: <20200103081714.9560-59-tiwai@suse.de> (raw) In-Reply-To: <20200103081714.9560-1-tiwai@suse.de> The snd_pci_quirk tables are referred as read-only, hence they can be declared as const gracefully. There should be no functional changes by this patch. Signed-off-by: Takashi Iwai <tiwai@suse.de> --- sound/pci/atiixp.c | 2 +- sound/pci/ctxfi/ctatc.c | 4 ++-- sound/pci/ens1370.c | 8 ++++---- sound/pci/intel8x0.c | 6 +++--- sound/pci/maestro3.c | 8 ++++---- sound/pci/nm256/nm256.c | 2 +- sound/pci/via82xx.c | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index c3281fab365d..4a840734e7a7 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c @@ -282,7 +282,7 @@ static const struct pci_device_id snd_atiixp_ids[] = { MODULE_DEVICE_TABLE(pci, snd_atiixp_ids); -static struct snd_pci_quirk atiixp_quirks[] = { +static const struct snd_pci_quirk atiixp_quirks[] = { SND_PCI_QUIRK(0x105b, 0x0c81, "Foxconn RC4107MA-RS2", 0), SND_PCI_QUIRK(0x15bd, 0x3100, "DFI RS482", 0), { } /* terminator */ diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index 8d92154ac262..e56a230f6a9c 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c @@ -35,7 +35,7 @@ | (0x10 << 16) \ | ((IEC958_AES3_CON_FS_48000) << 24)) -static struct snd_pci_quirk subsys_20k1_list[] = { +static const struct snd_pci_quirk subsys_20k1_list[] = { SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0022, "SB055x", CTSB055X), SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x002f, "SB055x", CTSB055X), SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0029, "SB073x", CTSB073X), @@ -45,7 +45,7 @@ static struct snd_pci_quirk subsys_20k1_list[] = { { } /* terminator */ }; -static struct snd_pci_quirk subsys_20k2_list[] = { +static const struct snd_pci_quirk subsys_20k2_list[] = { SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, PCI_SUBDEVICE_ID_CREATIVE_SB0760, "SB0760", CTSB0760), SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, PCI_SUBDEVICE_ID_CREATIVE_SB1270, diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 4f8202980b61..7ef9b7a1b2e6 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c @@ -1562,7 +1562,7 @@ struct es1371_quirk { }; static int es1371_quirk_lookup(struct ensoniq *ensoniq, - struct es1371_quirk *list) + const struct es1371_quirk *list) { while (list->vid != (unsigned short)PCI_ANY_ID) { if (ensoniq->pci->vendor == list->vid && @@ -1583,7 +1583,7 @@ static struct es1371_quirk es1371_spdif_present[] = { { .vid = PCI_ANY_ID, .did = PCI_ANY_ID } }; -static struct snd_pci_quirk ens1373_line_quirk[] = { +static const struct snd_pci_quirk ens1373_line_quirk[] = { SND_PCI_QUIRK_ID(0x1274, 0x2000), /* GA-7DXR */ SND_PCI_QUIRK_ID(0x1458, 0xa000), /* GA-8IEXP */ { } /* end */ @@ -1909,7 +1909,7 @@ static int snd_ensoniq_dev_free(struct snd_device *device) } #ifdef CHIP1371 -static struct snd_pci_quirk es1371_amplifier_hack[] = { +static const struct snd_pci_quirk es1371_amplifier_hack[] = { SND_PCI_QUIRK_ID(0x107b, 0x2150), /* Gateway Solo 2150 */ SND_PCI_QUIRK_ID(0x13bd, 0x100c), /* EV1938 on Mebius PC-MJ100V */ SND_PCI_QUIRK_ID(0x1102, 0x5938), /* Targa Xtender300 */ @@ -1917,7 +1917,7 @@ static struct snd_pci_quirk es1371_amplifier_hack[] = { { } /* end */ }; -static struct es1371_quirk es1371_ac97_reset_hack[] = { +static const struct es1371_quirk es1371_ac97_reset_hack[] = { { .vid = PCI_VENDOR_ID_ENSONIQ, .did = PCI_DEVICE_ID_ENSONIQ_CT5880, .rev = CT5880REV_CT5880_C }, { .vid = PCI_VENDOR_ID_ENSONIQ, .did = PCI_DEVICE_ID_ENSONIQ_CT5880, .rev = CT5880REV_CT5880_D }, { .vid = PCI_VENDOR_ID_ENSONIQ, .did = PCI_DEVICE_ID_ENSONIQ_CT5880, .rev = CT5880REV_CT5880_E }, diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index de875ea8ecbe..5bdd25815fc7 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -2328,7 +2328,7 @@ static void do_ali_reset(struct intel8x0 *chip) } #ifdef CONFIG_SND_AC97_POWER_SAVE -static struct snd_pci_quirk ich_chip_reset_mode[] = { +static const struct snd_pci_quirk ich_chip_reset_mode[] = { SND_PCI_QUIRK(0x1014, 0x051f, "Thinkpad R32", 1), { } /* end */ }; @@ -2774,7 +2774,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0); } -static struct snd_pci_quirk intel8x0_clock_list[] = { +static const struct snd_pci_quirk intel8x0_clock_list[] = { SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000), SND_PCI_QUIRK(0x1014, 0x0581, "AD1981B", 48000), SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100), @@ -3133,7 +3133,7 @@ static struct shortname_table { { 0, NULL }, }; -static struct snd_pci_quirk spdif_aclink_defaults[] = { +static const struct snd_pci_quirk spdif_aclink_defaults[] = { SND_PCI_QUIRK(0x147b, 0x1c1a, "ASUS KN8", 1), { } /* end */ }; diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index 89018d44d777..40232a278b1a 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c @@ -807,7 +807,7 @@ static const struct pci_device_id snd_m3_ids[] = { MODULE_DEVICE_TABLE(pci, snd_m3_ids); -static struct snd_pci_quirk m3_amp_quirk_list[] = { +static const struct snd_pci_quirk m3_amp_quirk_list[] = { SND_PCI_QUIRK(0x0E11, 0x0094, "Compaq Evo N600c", 0x0c), SND_PCI_QUIRK(0x10f7, 0x833e, "Panasonic CF-28", 0x0d), SND_PCI_QUIRK(0x10f7, 0x833d, "Panasonic CF-72", 0x0d), @@ -816,7 +816,7 @@ static struct snd_pci_quirk m3_amp_quirk_list[] = { { } /* END */ }; -static struct snd_pci_quirk m3_irda_quirk_list[] = { +static const struct snd_pci_quirk m3_irda_quirk_list[] = { SND_PCI_QUIRK(0x1028, 0x00b0, "Dell Inspiron 4000", 1), SND_PCI_QUIRK(0x1028, 0x00a4, "Dell Inspiron 8000", 1), SND_PCI_QUIRK(0x1028, 0x00e6, "Dell Inspiron 8100", 1), @@ -824,7 +824,7 @@ static struct snd_pci_quirk m3_irda_quirk_list[] = { }; /* hardware volume quirks */ -static struct snd_pci_quirk m3_hv_quirk_list[] = { +static const struct snd_pci_quirk m3_hv_quirk_list[] = { /* Allegro chips */ SND_PCI_QUIRK(0x0E11, 0x002E, NULL, HV_CTRL_ENABLE | HV_BUTTON_FROM_GD), SND_PCI_QUIRK(0x0E11, 0x0094, NULL, HV_CTRL_ENABLE | HV_BUTTON_FROM_GD), @@ -902,7 +902,7 @@ static struct snd_pci_quirk m3_hv_quirk_list[] = { }; /* HP Omnibook quirks */ -static struct snd_pci_quirk m3_omnibook_quirk_list[] = { +static const struct snd_pci_quirk m3_omnibook_quirk_list[] = { SND_PCI_QUIRK_ID(0x103c, 0x0010), /* HP OmniBook 6000 */ SND_PCI_QUIRK_ID(0x103c, 0x0011), /* HP OmniBook 500 */ { } /* END */ diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index 99228b93b3c6..25275a98e950 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c @@ -1634,7 +1634,7 @@ snd_nm256_create(struct snd_card *card, struct pci_dev *pci, enum { NM_BLACKLISTED, NM_RESET_WORKAROUND, NM_RESET_WORKAROUND_2 }; -static struct snd_pci_quirk nm256_quirks[] = { +static const struct snd_pci_quirk nm256_quirks[] = { /* HP omnibook 4150 has cs4232 codec internally */ SND_PCI_QUIRK(0x103c, 0x0007, "HP omnibook 4150", NM_BLACKLISTED), /* Reset workarounds to avoid lock-ups */ diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index c8fb51885b6d..6c83ad3275f9 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c @@ -2417,7 +2417,7 @@ static struct via823x_info via823x_cards[] = { * auto detection of DXS channel supports. */ -static struct snd_pci_quirk dxs_whitelist[] = { +static const struct snd_pci_quirk dxs_whitelist[] = { SND_PCI_QUIRK(0x1005, 0x4710, "Avance Logic Mobo", VIA_DXS_ENABLE), SND_PCI_QUIRK(0x1019, 0x0996, "ESC Mobo", VIA_DXS_48K), SND_PCI_QUIRK(0x1019, 0x0a81, "ECS K7VTA3 v8.0", VIA_DXS_NO_VRA), -- 2.16.4 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
prev parent reply index Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-01-03 8:16 [alsa-devel] [PATCH 00/58] ALSA: Constifications Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 01/58] ALSA: pci: Constify snd_pcm_hardware definitions Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 02/58] ALSA: usb: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 03/58] ALSA: core: Treat snd_device_ops as const Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 04/58] ALSA: core: Constify snd_device_ops definitions Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 05/58] ALSA: drivers: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 06/58] ALSA: i2c: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 07/58] ALSA: isa: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 08/58] ALSA: hda: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 09/58] ALSA: pci: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 10/58] ALSA: usb: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 11/58] ALSA: aoa: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 12/58] ALSA: mips: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 13/58] ALSA: parisc: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 14/58] ALSA: pcmcia: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 15/58] ALSA: ppc: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 16/58] ALSA: sparc: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 17/58] ALSA: sh: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 18/58] ALSA: spi: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 19/58] ALSA: docs: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 20/58] ALSA: timer: Constify snd_timer_hardware definitions Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 21/58] ALSA: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 22/58] ALSA: ac97: Treat snd_ac97_bus_ops as const Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 23/58] ALSA: ac97: Constify snd_ac97_bus_ops definitions Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 24/58] ALSA: arm: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 25/58] ALSA: atmel: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 26/58] ALSA: drivers: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 27/58] ALSA: pci: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 28/58] ALSA: info: Make snd_info_entry_ops as const Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 29/58] ALSA: seq: Constify struct snd_midi_op Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 30/58] ALSA: vx: Constify snd_vx_hardware and snd_vx_ops definitions Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 31/58] ALSA: mixer: oss: Constify snd_mixer_oss_assign_table definition Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 32/58] ALSA: aoa: Constify snd_kcontrol_new items Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 33/58] ALSA: drivers: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 34/58] ALSA: i2c: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 35/58] ALSA: isa: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 36/58] ALSA: hda: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 37/58] ALSA: pci: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 38/58] ALSA: ppc: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 39/58] ALSA: sparc: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 40/58] ALSA: spi: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 41/58] ALSA: usb: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 42/58] ALSA: parisc: " Takashi Iwai 2020-01-03 8:16 ` [alsa-devel] [PATCH 43/58] ALSA: dummy: Constify snd_pcm_ops definitions Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 44/58] ALSA: opl3: Constify snd_opl3_drum_voice definitions Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 45/58] ALSA: ac97: Constify snd_ac97_res_table definition Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 46/58] ALSA: ca0106: Constify snd_ca0106_category_str items Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 47/58] ALSA: ca0106: Constify snd_ca0106_details Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 48/58] ALSA: ice17xx: Constify snd_ice1712_card_info Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 49/58] ALSA: ice1712: Constify wm-specific tables Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 50/58] ALSA: line6: Constify snd_ratden definitions Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 51/58] ALSA: usx2y: Constify struct snd_usb_audio_quirk entries Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 52/58] ALSA: seq: oss: Constify snd_seq_oss_callback definitions Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 53/58] ALSA: bt87x: Constify snd_bt87x_boards Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 54/58] ALSA: emu10k1: Constify snd_emu_chip_details Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 55/58] ALSA: es1968: Constify snd_es1968_tea575x_gpios Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 56/58] ALSA: fm801: Constify snd_fm801_tea575x_gpios Takashi Iwai 2020-01-03 8:17 ` [alsa-devel] [PATCH 57/58] ALSA: hda: Constify snd_pci_quirk tables Takashi Iwai 2020-01-03 8:17 ` Takashi Iwai [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200103081714.9560-59-tiwai@suse.de \ --to=tiwai@suse.de \ --cc=alsa-devel@alsa-project.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Alsa-Devel Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \ alsa-devel@alsa-project.org public-inbox-index alsa-devel Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel AGPL code for this site: git clone https://public-inbox.org/public-inbox.git