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>
This commit is contained in:
Takashi Iwai
2019-02-04 16:01:39 +01:00
parent 5a170e9e4c
commit 47f2769b4b
38 changed files with 133 additions and 278 deletions

View File

@@ -741,10 +741,8 @@ snd_ad1889_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffe
static void
snd_ad1889_proc_init(struct snd_ad1889 *chip)
{
struct snd_info_entry *entry;
if (!snd_card_proc_new(chip->card, chip->card->driver, &entry))
snd_info_set_text_ops(entry, chip, snd_ad1889_proc_read);
snd_card_ro_proc_new(chip->card, chip->card->driver,
chip, snd_ad1889_proc_read);
}
static const struct ac97_quirk ac97_quirks[] = {