Skip to content

Commit

Permalink
ALSA: pcxhr: More constifications
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jan 5, 2020
1 parent 7ec03ff commit 98fd539
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sound/pci/pcxhr/pcxhr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
6 changes: 3 additions & 3 deletions sound/pci/pcxhr/pcxhr_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/pcxhr/pcxhr_hwdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 98fd539

Please sign in to comment.