Commit 3c6ee770 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: sparc: 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: default avatarJaroslav Kysela <perex@perex.cz>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 50a7a8e9
...@@ -2510,16 +2510,10 @@ static void dbri_debug_read(struct snd_info_entry *entry, ...@@ -2510,16 +2510,10 @@ static void dbri_debug_read(struct snd_info_entry *entry,
static void snd_dbri_proc(struct snd_card *card) static void snd_dbri_proc(struct snd_card *card)
{ {
struct snd_dbri *dbri = card->private_data; struct snd_dbri *dbri = card->private_data;
struct snd_info_entry *entry;
if (!snd_card_proc_new(card, "regs", &entry))
snd_info_set_text_ops(entry, dbri, dbri_regs_read);
snd_card_ro_proc_new(card, "regs", dbri, dbri_regs_read);
#ifdef DBRI_DEBUG #ifdef DBRI_DEBUG
if (!snd_card_proc_new(card, "debug", &entry)) { snd_card_ro_proc_new(card, "debug", dbri, dbri_debug_read);
snd_info_set_text_ops(entry, dbri, dbri_debug_read);
entry->mode = S_IFREG | 0444; /* Readable only. */
}
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment