From 47f2769b4b2e267cba135fc19c89c32d202b1415 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 4 Feb 2019 16:01:39 +0100 Subject: ALSA: pci: 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 Signed-off-by: Takashi Iwai --- sound/pci/emu10k1/emu10k1x.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sound/pci/emu10k1/emu10k1x.c') diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 611589cbdad6..576c7bd03a1a 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c @@ -1065,15 +1065,9 @@ static void snd_emu10k1x_proc_reg_write(struct snd_info_entry *entry, static int snd_emu10k1x_proc_init(struct emu10k1x *emu) { - struct snd_info_entry *entry; - - if(! snd_card_proc_new(emu->card, "emu10k1x_regs", &entry)) { - snd_info_set_text_ops(entry, emu, snd_emu10k1x_proc_reg_read); - entry->c.text.write = snd_emu10k1x_proc_reg_write; - entry->mode |= 0200; - entry->private_data = emu; - } - + snd_card_rw_proc_new(emu->card, "emu10k1x_regs", emu, + snd_emu10k1x_proc_reg_read, + snd_emu10k1x_proc_reg_write); return 0; } -- cgit v1.2.3