From: Takashi Iwai Date: Sun, 5 Jan 2020 14:47:38 +0000 (+0100) Subject: ALSA: pcxhr: More constifications X-Git-Tag: v5.15~4528^2~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98fd539841319a46ba3773d908bfde13416d57eb;p=platform%2Fkernel%2Flinux-starfive.git ALSA: pcxhr: More constifications Apply const prefix to each possible place: the board parameters and DSP command table, and the string arrays. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-24-tiwai@suse.de Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index 9e59d59..c2e4831 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c @@ -136,7 +136,7 @@ struct board_parameters { short fw_file_set; short firmware_num; }; -static struct board_parameters pcxhr_board_params[] = { +static const struct board_parameters pcxhr_board_params[] = { [PCI_ID_VX882HR] = { "VX882HR", 4, 4, 0, 41 }, [PCI_ID_PCX882HR] = { "PCX882HR", 4, 4, 0, 41 }, [PCI_ID_VX881HR] = { "VX881HR", 4, 4, 0, 41 }, diff --git a/sound/pci/pcxhr/pcxhr_core.c b/sound/pci/pcxhr/pcxhr_core.c index 495be27..87d2422 100644 --- a/sound/pci/pcxhr/pcxhr_core.c +++ b/sound/pci/pcxhr/pcxhr_core.c @@ -466,7 +466,7 @@ enum { /* * Array of DSP commands */ -static struct pcxhr_cmd_info pcxhr_dsp_cmds[] = { +static const struct pcxhr_cmd_info pcxhr_dsp_cmds[] = { [CMD_VERSION] = { 0x010000, 1, RMH_SSIZE_FIXED }, [CMD_SUPPORTED] = { 0x020000, 4, RMH_SSIZE_FIXED }, [CMD_TEST_IT] = { 0x040000, 1, RMH_SSIZE_FIXED }, @@ -497,7 +497,7 @@ static struct pcxhr_cmd_info pcxhr_dsp_cmds[] = { }; #ifdef CONFIG_SND_DEBUG_VERBOSE -static char* cmd_names[] = { +static const char * const cmd_names[] = { [CMD_VERSION] = "CMD_VERSION", [CMD_SUPPORTED] = "CMD_SUPPORTED", [CMD_TEST_IT] = "CMD_TEST_IT", @@ -1006,7 +1006,7 @@ static int pcxhr_handle_async_err(struct pcxhr_mgr *mgr, u32 err, enum pcxhr_async_err_src err_src, int pipe, int is_capture) { - static char* err_src_name[] = { + static const char * const err_src_name[] = { [PCXHR_ERR_PIPE] = "Pipe", [PCXHR_ERR_STREAM] = "Stream", [PCXHR_ERR_AUDIO] = "Audio" diff --git a/sound/pci/pcxhr/pcxhr_hwdep.c b/sound/pci/pcxhr/pcxhr_hwdep.c index 12a6bdb..2258bd6 100644 --- a/sound/pci/pcxhr/pcxhr_hwdep.c +++ b/sound/pci/pcxhr/pcxhr_hwdep.c @@ -348,7 +348,7 @@ static int pcxhr_dsp_load(struct pcxhr_mgr *mgr, int index, */ int pcxhr_setup_firmware(struct pcxhr_mgr *mgr) { - static char *fw_files[][5] = { + static const char * const fw_files[][5] = { [0] = { "xlxint.dat", "xlxc882hr.dat", "dspe882.e56", "dspb882hr.b56", "dspd882.d56" }, [1] = { "xlxint.dat", "xlxc882e.dat",