hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
....@@ -1,21 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for Sound Core PDAudioCF soundcard
34 *
45 * Copyright (c) 2003 by Jaroslav Kysela <perex@perex.cz>
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
196 */
207
218 #include <linux/delay.h>
....@@ -148,10 +135,7 @@
148135
149136 static void pdacf_proc_init(struct snd_pdacf *chip)
150137 {
151
- struct snd_info_entry *entry;
152
-
153
- if (! snd_card_proc_new(chip->card, "pdaudiocf", &entry))
154
- snd_info_set_text_ops(entry, chip, pdacf_proc_read);
138
+ snd_card_ro_proc_new(chip->card, "pdaudiocf", chip, pdacf_proc_read);
155139 }
156140
157141 struct snd_pdacf *snd_pdacf_create(struct snd_card *card)
....@@ -195,7 +179,7 @@
195179 /* from AK4117 then INT1 pin from AK4117 will be high all time, because PCMCIA interrupts are */
196180 /* egde based and FPGA does logical OR for all interrupt sources, we cannot use these */
197181 /* high-rate sources */
198
- static unsigned char pgm[5] = {
182
+ static const unsigned char pgm[5] = {
199183 AK4117_XTL_24_576M | AK4117_EXCT, /* AK4117_REG_PWRDN */
200184 AK4117_CM_PLL_XTAL | AK4117_PKCS_128fs | AK4117_XCKS_128fs, /* AK4117_REQ_CLOCK */
201185 AK4117_EFH_1024LRCLK | AK4117_DIF_24R | AK4117_IPS, /* AK4117_REG_IO */
....@@ -265,7 +249,6 @@
265249 u16 val;
266250
267251 snd_power_change_state(chip->card, SNDRV_CTL_POWER_D3hot);
268
- snd_pcm_suspend_all(chip->pcm);
269252 /* disable interrupts, but use direct write to preserve old register value in chip->regmap */
270253 val = inw(chip->port + PDAUDIOCF_REG_IER);
271254 val &= ~(PDAUDIOCF_IRQOVREN|PDAUDIOCF_IRQAKMEN|PDAUDIOCF_IRQLVLEN0|PDAUDIOCF_IRQLVLEN1);