hc
2024-05-10 cde9070d9970eef1f7ec2360586c802a16230ad8
kernel/sound/pci/cs5535audio/cs5535audio.c
....@@ -1,24 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Driver for audio on multifunction CS5535/6 companion device
34 * Copyright (C) Jaya Kumar
45 *
56 * Based on Jaroslav Kysela and Takashi Iwai's examples.
67 * This work was sponsored by CIS(M) Sdn Bhd.
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
- *
228 */
239
2410 #include <linux/delay.h>
....@@ -152,7 +138,7 @@
152138 struct snd_ac97_bus *pbus;
153139 struct snd_ac97_template ac97;
154140 int err;
155
- static struct snd_ac97_bus_ops ops = {
141
+ static const struct snd_ac97_bus_ops ops = {
156142 .write = snd_cs5535audio_ac97_codec_write,
157143 .read = snd_cs5535audio_ac97_codec_read,
158144 };
....@@ -251,7 +237,6 @@
251237
252238 static int snd_cs5535audio_free(struct cs5535audio *cs5535au)
253239 {
254
- synchronize_irq(cs5535au->irq);
255240 pci_set_power_state(cs5535au->pci, PCI_D3hot);
256241
257242 if (cs5535au->irq >= 0)
....@@ -276,7 +261,7 @@
276261 struct cs5535audio *cs5535au;
277262
278263 int err;
279
- static struct snd_device_ops ops = {
264
+ static const struct snd_device_ops ops = {
280265 .dev_free = snd_cs5535audio_dev_free,
281266 };
282267
....@@ -317,6 +302,7 @@
317302 }
318303
319304 cs5535au->irq = pci->irq;
305
+ card->sync_irq = cs5535au->irq;
320306 pci_set_master(pci);
321307
322308 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,