hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/sound/pci/hda/hda_proc.c
....@@ -1,31 +1,17 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Universal Interface for Intel High Definition Audio Codec
34 *
45 * Generic proc interface
56 *
67 * Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
7
- *
8
- *
9
- * This driver is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This driver is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
18
- *
19
- * You should have received a copy of the GNU General Public License
20
- * along with this program; if not, write to the Free Software
21
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
228 */
239
2410 #include <linux/init.h>
2511 #include <linux/slab.h>
2612 #include <sound/core.h>
2713 #include <linux/module.h>
28
-#include "hda_codec.h"
14
+#include <sound/hda_codec.h>
2915 #include "hda_local.h"
3016
3117 static int dump_coef = -1;
....@@ -174,7 +160,7 @@
174160
175161 static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm)
176162 {
177
- static unsigned int rates[] = {
163
+ static const unsigned int rates[] = {
178164 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200,
179165 96000, 176400, 192000, 384000
180166 };
....@@ -919,15 +905,8 @@
919905 int snd_hda_codec_proc_new(struct hda_codec *codec)
920906 {
921907 char name[32];
922
- struct snd_info_entry *entry;
923
- int err;
924908
925909 snprintf(name, sizeof(name), "codec#%d", codec->core.addr);
926
- err = snd_card_proc_new(codec->card, name, &entry);
927
- if (err < 0)
928
- return err;
929
-
930
- snd_info_set_text_ops(entry, codec, print_codec_info);
931
- return 0;
910
+ return snd_card_ro_proc_new(codec->card, name, codec, print_codec_info);
932911 }
933912