summaryrefslogtreecommitdiff
path: root/sound/pci/ymfpci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 18:01:39 +0300
committerTakashi Iwai <tiwai@suse.de>2019-02-06 20:11:56 +0300
commit47f2769b4b2e267cba135fc19c89c32d202b1415 (patch)
tree58078c2d663d901622b6015bbfde465e2dda7e8f /sound/pci/ymfpci
parent5a170e9e4c74bc7f9aa57861c90e5813d63bfdab (diff)
downloadlinux-47f2769b4b2e267cba135fc19c89c32d202b1415.tar.xz
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 <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ymfpci')
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index c688b7f481da..4d48877f211f 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -1985,11 +1985,7 @@ static void snd_ymfpci_proc_read(struct snd_info_entry *entry,
static int snd_ymfpci_proc_init(struct snd_card *card, struct snd_ymfpci *chip)
{
- struct snd_info_entry *entry;
-
- if (! snd_card_proc_new(card, "ymfpci", &entry))
- snd_info_set_text_ops(entry, chip, snd_ymfpci_proc_read);
- return 0;
+ return snd_card_ro_proc_new(card, "ymfpci", chip, snd_ymfpci_proc_read);
}
/*