ALSA: drivers: 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 15:58:33 +01:00
父節點 7453e1dafd
當前提交 815d808c7b
共有 3 個文件被更改,包括 5 次插入20 次删除

查看文件

@@ -643,10 +643,7 @@ static void vx_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *b
static void vx_proc_init(struct vx_core *chip)
{
struct snd_info_entry *entry;
if (! snd_card_proc_new(chip->card, "vx-status", &entry))
snd_info_set_text_ops(entry, chip, vx_proc_read);
snd_card_ro_proc_new(chip->card, "vx-status", chip, vx_proc_read);
}