| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for AMD InterWave soundcard |
|---|
| 3 | 4 | * Copyright (c) by Jaroslav Kysela <perex@perex.cz> |
|---|
| 4 | 5 | * |
|---|
| 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 | | - * |
|---|
| 20 | 6 | * 1999/07/22 Erik Inge Bolso <knan@mo.himolde.no> |
|---|
| 21 | 7 | * * mixer group handlers |
|---|
| 22 | | - * |
|---|
| 23 | 8 | */ |
|---|
| 24 | 9 | |
|---|
| 25 | 10 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 379 | 364 | |
|---|
| 380 | 365 | static void snd_interwave_detect_memory(struct snd_gus_card *gus) |
|---|
| 381 | 366 | { |
|---|
| 382 | | - static unsigned int lmc[13] = |
|---|
| 367 | + static const unsigned int lmc[13] = |
|---|
| 383 | 368 | { |
|---|
| 384 | 369 | 0x00000001, 0x00000101, 0x01010101, 0x00000401, |
|---|
| 385 | 370 | 0x04040401, 0x00040101, 0x04040101, 0x00000004, |
|---|
| .. | .. |
|---|
| 490 | 475 | |
|---|
| 491 | 476 | } |
|---|
| 492 | 477 | |
|---|
| 493 | | -static struct snd_kcontrol_new snd_interwave_controls[] = { |
|---|
| 478 | +static const struct snd_kcontrol_new snd_interwave_controls[] = { |
|---|
| 494 | 479 | WSS_DOUBLE("Master Playback Switch", 0, |
|---|
| 495 | 480 | CS4231_LINE_LEFT_OUTPUT, CS4231_LINE_RIGHT_OUTPUT, 7, 7, 1, 1), |
|---|
| 496 | 481 | WSS_DOUBLE("Master Playback Volume", 0, |
|---|
| .. | .. |
|---|
| 682 | 667 | return -EBUSY; |
|---|
| 683 | 668 | } |
|---|
| 684 | 669 | iwcard->irq = xirq; |
|---|
| 670 | + card->sync_irq = iwcard->irq; |
|---|
| 685 | 671 | |
|---|
| 686 | 672 | err = snd_wss_create(card, |
|---|
| 687 | 673 | gus->gf1.port + 0x10c, -1, xirq, |
|---|
| .. | .. |
|---|
| 802 | 788 | unsigned int dev) |
|---|
| 803 | 789 | { |
|---|
| 804 | 790 | 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}; |
|---|
| 807 | 793 | |
|---|
| 808 | 794 | if (irq[dev] == SNDRV_AUTO_IRQ) { |
|---|
| 809 | 795 | if ((irq[dev] = snd_legacy_find_free_irq(possible_irqs)) < 0) { |
|---|
| .. | .. |
|---|
| 827 | 813 | if (port[dev] != SNDRV_AUTO_PORT) |
|---|
| 828 | 814 | return snd_interwave_isa_probe1(dev, pdev); |
|---|
| 829 | 815 | else { |
|---|
| 830 | | - static long possible_ports[] = {0x210, 0x220, 0x230, 0x240, 0x250, 0x260}; |
|---|
| 816 | + static const long possible_ports[] = {0x210, 0x220, 0x230, 0x240, 0x250, 0x260}; |
|---|
| 831 | 817 | int i; |
|---|
| 832 | 818 | for (i = 0; i < ARRAY_SIZE(possible_ports); i++) { |
|---|
| 833 | 819 | port[dev] = possible_ports[i]; |
|---|