forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/i2c/other/ak4113.c
....@@ -1,24 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Routines for control of the AK4113 via I2C/4-wire serial interface
34 * IEC958 (S/PDIF) receiver by Asahi Kasei
45 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
56 * 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
- *
227 */
238
249 #include <linux/slab.h>
....@@ -75,7 +60,7 @@
7560 struct ak4113 *chip;
7661 int err;
7762 unsigned char reg;
78
- static struct snd_device_ops ops = {
63
+ static const struct snd_device_ops ops = {
7964 .dev_free = snd_ak4113_dev_free,
8065 };
8166
....@@ -364,7 +349,7 @@
364349 }
365350
366351 /* 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[] = {
368353 {
369354 .iface = SNDRV_CTL_ELEM_IFACE_PCM,
370355 .name = "IEC958 Parity Errors",
....@@ -492,9 +477,8 @@
492477
493478 static void snd_ak4113_proc_init(struct ak4113 *ak4113)
494479 {
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);
498482 }
499483
500484 int snd_ak4113_build(struct ak4113 *ak4113,