hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/sound/isa/cmi8328.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Driver for C-Media CMI8328-based soundcards, such as AudioExcel AV500
34 * Copyright (c) 2012 Ondrej Zary
....@@ -31,7 +32,7 @@
3132 #endif
3233
3334 /* I/O port is configured by jumpers on the card to one of these */
34
-static int cmi8328_ports[] = { 0x530, 0xe80, 0xf40, 0x604 };
35
+static const int cmi8328_ports[] = { 0x530, 0xe80, 0xf40, 0x604 };
3536 #define CMI8328_MAX ARRAY_SIZE(cmi8328_ports)
3637
3738 static int index[CMI8328_MAX] = {[0 ... (CMI8328_MAX-1)] = -1};
....@@ -192,7 +193,7 @@
192193 }
193194
194195 /* find index of an item in "-1"-ended array */
195
-static int array_find(int array[], int item)
196
+static int array_find(const int array[], int item)
196197 {
197198 int i;
198199
....@@ -203,7 +204,7 @@
203204 return -1;
204205 }
205206 /* the same for long */
206
-static int array_find_l(long array[], long item)
207
+static int array_find_l(const long array[], long item)
207208 {
208209 int i;
209210
....@@ -223,16 +224,16 @@
223224 struct resource *res;
224225 #endif
225226 int err, pos;
226
- static long mpu_ports[] = { 0x330, 0x300, 0x310, 0x320, 0x332, 0x334,
227
+ static const long mpu_ports[] = { 0x330, 0x300, 0x310, 0x320, 0x332, 0x334,
227228 0x336, -1 };
228
- static u8 mpu_port_bits[] = { 3, 0, 1, 2, 4, 5, 6 };
229
- static int mpu_irqs[] = { 9, 7, 5, 3, -1 };
230
- static u8 mpu_irq_bits[] = { 3, 2, 1, 0 };
231
- static int irqs[] = { 9, 10, 11, 7, -1 };
232
- static u8 irq_bits[] = { 2, 3, 4, 1 };
233
- static int dma1s[] = { 3, 1, 0, -1 };
234
- static u8 dma_bits[] = { 3, 2, 1 };
235
- static int dma2s[][2] = { {1, -1}, {0, -1}, {-1, -1}, {0, -1} };
229
+ static const u8 mpu_port_bits[] = { 3, 0, 1, 2, 4, 5, 6 };
230
+ static const int mpu_irqs[] = { 9, 7, 5, 3, -1 };
231
+ static const u8 mpu_irq_bits[] = { 3, 2, 1, 0 };
232
+ static const int irqs[] = { 9, 10, 11, 7, -1 };
233
+ static const u8 irq_bits[] = { 2, 3, 4, 1 };
234
+ static const int dma1s[] = { 3, 1, 0, -1 };
235
+ static const u8 dma_bits[] = { 3, 2, 1 };
236
+ static const int dma2s[][2] = { {1, -1}, {0, -1}, {-1, -1}, {0, -1} };
236237 u16 port = cmi8328_ports[ndev];
237238 u8 val;
238239
....@@ -434,7 +435,6 @@
434435 cmi = card->private_data;
435436 snd_cmi8328_cfg_save(cmi->port, cmi->cfg);
436437 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
437
- snd_pcm_suspend_all(cmi->wss->pcm);
438438 cmi->wss->suspend(cmi->wss);
439439
440440 return 0;