| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Driver for Digigram VX222 V2/Mic soundcards |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * VX222-specific low-level routines |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 10 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 11 | | - * (at your option) any later version. |
|---|
| 12 | | - * |
|---|
| 13 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 16 | | - * GNU General Public License for more details. |
|---|
| 17 | | - * |
|---|
| 18 | | - * You should have received a copy of the GNU General Public License |
|---|
| 19 | | - * along with this program; if not, write to the Free Software |
|---|
| 20 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 21 | 8 | */ |
|---|
| 22 | 9 | |
|---|
| 23 | 10 | #include <linux/delay.h> |
|---|
| .. | .. |
|---|
| 32 | 19 | #include "vx222.h" |
|---|
| 33 | 20 | |
|---|
| 34 | 21 | |
|---|
| 35 | | -static int vx2_reg_offset[VX_REG_MAX] = { |
|---|
| 22 | +static const int vx2_reg_offset[VX_REG_MAX] = { |
|---|
| 36 | 23 | [VX_ICR] = 0x00, |
|---|
| 37 | 24 | [VX_CVR] = 0x04, |
|---|
| 38 | 25 | [VX_ISR] = 0x08, |
|---|
| .. | .. |
|---|
| 58 | 45 | [VX_GPIOC] = 0x54, // VX_GPIOC (new with PLX9030) |
|---|
| 59 | 46 | }; |
|---|
| 60 | 47 | |
|---|
| 61 | | -static int vx2_reg_index[VX_REG_MAX] = { |
|---|
| 48 | +static const int vx2_reg_index[VX_REG_MAX] = { |
|---|
| 62 | 49 | [VX_ICR] = 1, |
|---|
| 63 | 50 | [VX_CVR] = 1, |
|---|
| 64 | 51 | [VX_ISR] = 1, |
|---|
| .. | .. |
|---|
| 997 | 984 | /* |
|---|
| 998 | 985 | * callbacks |
|---|
| 999 | 986 | */ |
|---|
| 1000 | | -struct snd_vx_ops vx222_ops = { |
|---|
| 987 | +const struct snd_vx_ops vx222_ops = { |
|---|
| 1001 | 988 | .in8 = vx2_inb, |
|---|
| 1002 | 989 | .in32 = vx2_inl, |
|---|
| 1003 | 990 | .out8 = vx2_outb, |
|---|
| .. | .. |
|---|
| 1017 | 1004 | }; |
|---|
| 1018 | 1005 | |
|---|
| 1019 | 1006 | /* for old VX222 board */ |
|---|
| 1020 | | -struct snd_vx_ops vx222_old_ops = { |
|---|
| 1007 | +const struct snd_vx_ops vx222_old_ops = { |
|---|
| 1021 | 1008 | .in8 = vx2_inb, |
|---|
| 1022 | 1009 | .in32 = vx2_inl, |
|---|
| 1023 | 1010 | .out8 = vx2_outb, |
|---|