summaryrefslogtreecommitdiffstats
path: root/sound/isa/cmi8328.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-01-05 15:47:58 +0100
committerTakashi Iwai <tiwai@suse.de>2020-01-05 16:14:59 +0100
commitf3c0916946706f6aa8e9041f41378d9c26ba57d6 (patch)
tree3cea6a21d6e24db9e0e218505eaecf22af5ad352 /sound/isa/cmi8328.c
parente3de2a406ef525302e8a0805a753af13db26c844 (diff)
downloadlinux-f3c0916946706f6aa8e9041f41378d9c26ba57d6.tar.bz2
ALSA: cmi8328: More constifications
Apply const prefix to the static resource tables. Just for minor optimization and no functional changes. Link: https://lore.kernel.org/r/20200105144823.29547-44-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/cmi8328.c')
-rw-r--r--sound/isa/cmi8328.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/sound/isa/cmi8328.c b/sound/isa/cmi8328.c
index 250db35109a2..faca5dd95bfe 100644
--- a/sound/isa/cmi8328.c
+++ b/sound/isa/cmi8328.c
@@ -32,7 +32,7 @@ MODULE_LICENSE("GPL");
#endif
/* I/O port is configured by jumpers on the card to one of these */
-static int cmi8328_ports[] = { 0x530, 0xe80, 0xf40, 0x604 };
+static const int cmi8328_ports[] = { 0x530, 0xe80, 0xf40, 0x604 };
#define CMI8328_MAX ARRAY_SIZE(cmi8328_ports)
static int index[CMI8328_MAX] = {[0 ... (CMI8328_MAX-1)] = -1};
@@ -193,7 +193,7 @@ static int snd_cmi8328_mixer(struct snd_wss *chip)
}
/* find index of an item in "-1"-ended array */
-static int array_find(int array[], int item)
+static int array_find(const int array[], int item)
{
int i;
@@ -204,7 +204,7 @@ static int array_find(int array[], int item)
return -1;
}
/* the same for long */
-static int array_find_l(long array[], long item)
+static int array_find_l(const long array[], long item)
{
int i;
@@ -224,16 +224,16 @@ static int snd_cmi8328_probe(struct device *pdev, unsigned int ndev)
struct resource *res;
#endif
int err, pos;
- static long mpu_ports[] = { 0x330, 0x300, 0x310, 0x320, 0x332, 0x334,
+ static const long mpu_ports[] = { 0x330, 0x300, 0x310, 0x320, 0x332, 0x334,
0x336, -1 };
- static u8 mpu_port_bits[] = { 3, 0, 1, 2, 4, 5, 6 };
- static int mpu_irqs[] = { 9, 7, 5, 3, -1 };
- static u8 mpu_irq_bits[] = { 3, 2, 1, 0 };
- static int irqs[] = { 9, 10, 11, 7, -1 };
- static u8 irq_bits[] = { 2, 3, 4, 1 };
- static int dma1s[] = { 3, 1, 0, -1 };
- static u8 dma_bits[] = { 3, 2, 1 };
- static int dma2s[][2] = { {1, -1}, {0, -1}, {-1, -1}, {0, -1} };
+ static const u8 mpu_port_bits[] = { 3, 0, 1, 2, 4, 5, 6 };
+ static const int mpu_irqs[] = { 9, 7, 5, 3, -1 };
+ static const u8 mpu_irq_bits[] = { 3, 2, 1, 0 };
+ static const int irqs[] = { 9, 10, 11, 7, -1 };
+ static const u8 irq_bits[] = { 2, 3, 4, 1 };
+ static const int dma1s[] = { 3, 1, 0, -1 };
+ static const u8 dma_bits[] = { 3, 2, 1 };
+ static const int dma2s[][2] = { {1, -1}, {0, -1}, {-1, -1}, {0, -1} };
u16 port = cmi8328_ports[ndev];
u8 val;