From 1bac5e1c814220e1a199ceffb34b427930283d84 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 4 Feb 2019 16:00:13 +0100 Subject: ALSA: isa: 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/isa/gus/gus_irq.c | 5 +---- sound/isa/gus/gus_mem.c | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) (limited to 'sound/isa/gus') diff --git a/sound/isa/gus/gus_irq.c b/sound/isa/gus/gus_irq.c index 2055aff71b50..0ca6c38e2ed9 100644 --- a/sound/isa/gus/gus_irq.c +++ b/sound/isa/gus/gus_irq.c @@ -140,10 +140,7 @@ static void snd_gus_irq_info_read(struct snd_info_entry *entry, void snd_gus_irq_profile_init(struct snd_gus_card *gus) { - struct snd_info_entry *entry; - - if (! snd_card_proc_new(gus->card, "gusirq", &entry)) - snd_info_set_text_ops(entry, gus, snd_gus_irq_info_read); + snd_card_ro_proc_new(gus->card, "gusirq", gus, snd_gus_irq_info_read); } #endif diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index af888a022fc0..4ac76f46dd76 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c @@ -238,9 +238,6 @@ int snd_gf1_mem_init(struct snd_gus_card * gus) { struct snd_gf1_mem *alloc; struct snd_gf1_mem_block block; -#ifdef CONFIG_SND_DEBUG - struct snd_info_entry *entry; -#endif alloc = &gus->gf1.mem_alloc; mutex_init(&alloc->memory_mutex); @@ -263,8 +260,7 @@ int snd_gf1_mem_init(struct snd_gus_card * gus) if (snd_gf1_mem_xalloc(alloc, &block) == NULL) return -ENOMEM; #ifdef CONFIG_SND_DEBUG - if (! snd_card_proc_new(gus->card, "gusmem", &entry)) - snd_info_set_text_ops(entry, gus, snd_gf1_mem_info_read); + snd_card_ro_proc_new(gus->card, "gusmem", gus, snd_gf1_mem_info_read); #endif return 0; } -- cgit v1.2.3