ALSA: pcmcia: Clean up with new procfs helpers
authorTakashi Iwai <tiwai@suse.de>
Mon, 4 Feb 2019 15:06:27 +0000 (16:06 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 Feb 2019 17:11:57 +0000 (18:11 +0100)
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>
sound/pcmcia/pdaudiocf/pdaudiocf_core.c

index eabf2925289529a62fceed0274443e1b572ca2d7..910478275fd92c1cd64144e9bec09370847c14d0 100644 (file)
@@ -148,10 +148,7 @@ static void pdacf_proc_read(struct snd_info_entry * entry,
 
 static void pdacf_proc_init(struct snd_pdacf *chip)
 {
-       struct snd_info_entry *entry;
-
-       if (! snd_card_proc_new(chip->card, "pdaudiocf", &entry))
-               snd_info_set_text_ops(entry, chip, pdacf_proc_read);
+       snd_card_ro_proc_new(chip->card, "pdaudiocf", chip, pdacf_proc_read);
 }
 
 struct snd_pdacf *snd_pdacf_create(struct snd_card *card)