From 96d5ebf25e131b4e824754ec622b89260341302c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Sun, 5 Jan 2020 15:47:49 +0100 Subject: [PATCH] ALSA: es1938: More constifications Apply const prefix to the static register table and its callers. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-35-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/pci/es1938.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index 8336b20..b4a0adf 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c @@ -1420,7 +1420,7 @@ static void snd_es1938_chip_init(struct es1938 *chip) * PM support */ -static unsigned char saved_regs[SAVED_REG_SIZE+1] = { +static const unsigned char saved_regs[SAVED_REG_SIZE+1] = { 0x14, 0x1a, 0x1c, 0x3a, 0x3c, 0x3e, 0x36, 0x38, 0x50, 0x52, 0x60, 0x61, 0x62, 0x63, 0x64, 0x68, 0x69, 0x6a, 0x6b, 0x6d, 0x6e, 0x6f, 0x7c, 0x7d, @@ -1432,7 +1432,8 @@ static int es1938_suspend(struct device *dev) { struct snd_card *card = dev_get_drvdata(dev); struct es1938 *chip = card->private_data; - unsigned char *s, *d; + const unsigned char *s; + unsigned char *d; snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); @@ -1454,7 +1455,8 @@ static int es1938_resume(struct device *dev) struct pci_dev *pci = to_pci_dev(dev); struct snd_card *card = dev_get_drvdata(dev); struct es1938 *chip = card->private_data; - unsigned char *s, *d; + const unsigned char *s; + unsigned char *d; if (request_irq(pci->irq, snd_es1938_interrupt, IRQF_SHARED, KBUILD_MODNAME, chip)) { -- 2.7.4