aboutsummaryrefslogtreecommitdiffstats
path: root/sound/i2c/other/ak4xxx-adda.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 16:00:54 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-06 18:11:56 +0100
commit5a170e9e4c74bc7f9aa57861c90e5813d63bfdab (patch)
tree1862a2edbe90d29e8dca2b1e7f61676e92e84eff /sound/i2c/other/ak4xxx-adda.c
parentALSA: isa: Clean up with new procfs helpers (diff)
downloadlinux-dev-5a170e9e4c74bc7f9aa57861c90e5813d63bfdab.tar.xz
linux-dev-5a170e9e4c74bc7f9aa57861c90e5813d63bfdab.zip
ALSA: i2c: Clean up with new procfs helpers
Simplify the proc fs creation code with new helper functions, snd_card_ro_proc_new() and snd_card_rw_proc_new(). Just a code refactoring and no functional changes. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/i2c/other/ak4xxx-adda.c')
-rw-r--r--sound/i2c/other/ak4xxx-adda.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c
index 7f2761a2e7c8..62a6c5fa96b5 100644
--- a/sound/i2c/other/ak4xxx-adda.c
+++ b/sound/i2c/other/ak4xxx-adda.c
@@ -875,13 +875,7 @@ static void proc_regs_read(struct snd_info_entry *entry,
static int proc_init(struct snd_akm4xxx *ak)
{
- struct snd_info_entry *entry;
- int err;
- err = snd_card_proc_new(ak->card, ak->name, &entry);
- if (err < 0)
- return err;
- snd_info_set_text_ops(entry, ak, proc_regs_read);
- return 0;
+ return snd_card_ro_proc_new(ak->card, ak->name, ak, proc_regs_read);
}
int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak)