.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Routines for control of the AK4113 via I2C/4-wire serial interface |
---|
3 | 4 | * IEC958 (S/PDIF) receiver by Asahi Kasei |
---|
4 | 5 | * Copyright (c) by Jaroslav Kysela <perex@perex.cz> |
---|
5 | 6 | * Copyright (c) by Pavel Hofman <pavel.hofman@ivitera.com> |
---|
6 | | - * |
---|
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 | | - * |
---|
22 | 7 | */ |
---|
23 | 8 | |
---|
24 | 9 | #include <linux/slab.h> |
---|
.. | .. |
---|
75 | 60 | struct ak4113 *chip; |
---|
76 | 61 | int err; |
---|
77 | 62 | unsigned char reg; |
---|
78 | | - static struct snd_device_ops ops = { |
---|
| 63 | + static const struct snd_device_ops ops = { |
---|
79 | 64 | .dev_free = snd_ak4113_dev_free, |
---|
80 | 65 | }; |
---|
81 | 66 | |
---|
.. | .. |
---|
364 | 349 | } |
---|
365 | 350 | |
---|
366 | 351 | /* Don't forget to change AK4113_CONTROLS define!!! */ |
---|
367 | | -static struct snd_kcontrol_new snd_ak4113_iec958_controls[] = { |
---|
| 352 | +static const struct snd_kcontrol_new snd_ak4113_iec958_controls[] = { |
---|
368 | 353 | { |
---|
369 | 354 | .iface = SNDRV_CTL_ELEM_IFACE_PCM, |
---|
370 | 355 | .name = "IEC958 Parity Errors", |
---|
.. | .. |
---|
492 | 477 | |
---|
493 | 478 | static void snd_ak4113_proc_init(struct ak4113 *ak4113) |
---|
494 | 479 | { |
---|
495 | | - struct snd_info_entry *entry; |
---|
496 | | - if (!snd_card_proc_new(ak4113->card, "ak4113", &entry)) |
---|
497 | | - snd_info_set_text_ops(entry, ak4113, snd_ak4113_proc_regs_read); |
---|
| 480 | + snd_card_ro_proc_new(ak4113->card, "ak4113", ak4113, |
---|
| 481 | + snd_ak4113_proc_regs_read); |
---|
498 | 482 | } |
---|
499 | 483 | |
---|
500 | 484 | int snd_ak4113_build(struct ak4113 *ak4113, |
---|