hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/sound/isa/gus/interwave.c
....@@ -1,25 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for AMD InterWave soundcard
34 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
45 *
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
- *
206 * 1999/07/22 Erik Inge Bolso <knan@mo.himolde.no>
217 * * mixer group handlers
22
- *
238 */
249
2510 #include <linux/init.h>
....@@ -379,7 +364,7 @@
379364
380365 static void snd_interwave_detect_memory(struct snd_gus_card *gus)
381366 {
382
- static unsigned int lmc[13] =
367
+ static const unsigned int lmc[13] =
383368 {
384369 0x00000001, 0x00000101, 0x01010101, 0x00000401,
385370 0x04040401, 0x00040101, 0x04040101, 0x00000004,
....@@ -490,7 +475,7 @@
490475
491476 }
492477
493
-static struct snd_kcontrol_new snd_interwave_controls[] = {
478
+static const struct snd_kcontrol_new snd_interwave_controls[] = {
494479 WSS_DOUBLE("Master Playback Switch", 0,
495480 CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 7, 7, 1, 1),
496481 WSS_DOUBLE("Master Playback Volume", 0,
....@@ -682,6 +667,7 @@
682667 return -EBUSY;
683668 }
684669 iwcard->irq = xirq;
670
+ card->sync_irq = iwcard->irq;
685671
686672 err = snd_wss_create(card,
687673 gus->gf1.port + 0x10c, -1, xirq,
....@@ -802,8 +788,8 @@
802788 unsigned int dev)
803789 {
804790 int err;
805
- static int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
806
- static int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1};
791
+ static const int possible_irqs[] = {5, 11, 12, 9, 7, 15, 3, -1};
792
+ static const int possible_dmas[] = {0, 1, 3, 5, 6, 7, -1};
807793
808794 if (irq[dev] == SNDRV_AUTO_IRQ) {
809795 if ((irq[dev] = snd_legacy_find_free_irq(possible_irqs)) < 0) {
....@@ -827,7 +813,7 @@
827813 if (port[dev] != SNDRV_AUTO_PORT)
828814 return snd_interwave_isa_probe1(dev, pdev);
829815 else {
830
- static long possible_ports[] = {0x210, 0x220, 0x230, 0x240, 0x250, 0x260};
816
+ static const long possible_ports[] = {0x210, 0x220, 0x230, 0x240, 0x250, 0x260};
831817 int i;
832818 for (i = 0; i < ARRAY_SIZE(possible_ports); i++) {
833819 port[dev] = possible_ports[i];