summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 10:06:43 -0500
committerTakashi Iwai <tiwai@suse.de>2019-02-06 12:11:57 -0500
commit3c6ee77088a9b5188d065780b1c540f5e3d879c8 (patch)
treeb96241ef5bd74ae4328cbf483aa4a89f474f1a63
parent50a7a8e916edd7d5e3ce9a96c3bd1216cef93a58 (diff)
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: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/sparc/dbri.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 7609eceba1a2..682166202098 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2510,16 +2510,10 @@ static void dbri_debug_read(struct snd_info_entry *entry,
2510static void snd_dbri_proc(struct snd_card *card) 2510static void snd_dbri_proc(struct snd_card *card)
2511{ 2511{
2512 struct snd_dbri *dbri = card->private_data; 2512 struct snd_dbri *dbri = card->private_data;
2513 struct snd_info_entry *entry;
2514
2515 if (!snd_card_proc_new(card, "regs", &entry))
2516 snd_info_set_text_ops(entry, dbri, dbri_regs_read);
2517 2513
2514 snd_card_ro_proc_new(card, "regs", dbri, dbri_regs_read);
2518#ifdef DBRI_DEBUG 2515#ifdef DBRI_DEBUG
2519 if (!snd_card_proc_new(card, "debug", &entry)) { 2516 snd_card_ro_proc_new(card, "debug", dbri, dbri_debug_read);
2520 snd_info_set_text_ops(entry, dbri, dbri_debug_read);
2521 entry->mode = S_IFREG | 0444; /* Readable only. */
2522 }
2523#endif 2517#endif
2524} 2518}
2525 2519