| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Universal Interface for Intel High Definition Audio Codec |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Generic proc interface |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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 |
|---|
| 22 | 8 | */ |
|---|
| 23 | 9 | |
|---|
| 24 | 10 | #include <linux/init.h> |
|---|
| 25 | 11 | #include <linux/slab.h> |
|---|
| 26 | 12 | #include <sound/core.h> |
|---|
| 27 | 13 | #include <linux/module.h> |
|---|
| 28 | | -#include "hda_codec.h" |
|---|
| 14 | +#include <sound/hda_codec.h> |
|---|
| 29 | 15 | #include "hda_local.h" |
|---|
| 30 | 16 | |
|---|
| 31 | 17 | static int dump_coef = -1; |
|---|
| .. | .. |
|---|
| 174 | 160 | |
|---|
| 175 | 161 | static void print_pcm_rates(struct snd_info_buffer *buffer, unsigned int pcm) |
|---|
| 176 | 162 | { |
|---|
| 177 | | - static unsigned int rates[] = { |
|---|
| 163 | + static const unsigned int rates[] = { |
|---|
| 178 | 164 | 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, |
|---|
| 179 | 165 | 96000, 176400, 192000, 384000 |
|---|
| 180 | 166 | }; |
|---|
| .. | .. |
|---|
| 919 | 905 | int snd_hda_codec_proc_new(struct hda_codec *codec) |
|---|
| 920 | 906 | { |
|---|
| 921 | 907 | char name[32]; |
|---|
| 922 | | - struct snd_info_entry *entry; |
|---|
| 923 | | - int err; |
|---|
| 924 | 908 | |
|---|
| 925 | 909 | 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); |
|---|
| 932 | 911 | } |
|---|
| 933 | 912 | |
|---|