summaryrefslogtreecommitdiffstats
path: root/sound/drivers/aloop.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 15:58:33 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-06 18:11:55 +0100
commit815d808c7bfc91edbf25813cea54709f4a805c71 (patch)
treefe61cfdfe16a1454879a047e8deed249cb90d802 /sound/drivers/aloop.c
parentALSA: info: Add standard helpers for card proc file entries (diff)
downloadlinux-815d808c7bfc91edbf25813cea54709f4a805c71.tar.xz
linux-815d808c7bfc91edbf25813cea54709f4a805c71.zip
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>
Diffstat (limited to 'sound/drivers/aloop.c')
-rw-r--r--sound/drivers/aloop.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c
index 65c903b639c2..8c3fbe1276be 100644
--- a/sound/drivers/aloop.c
+++ b/sound/drivers/aloop.c
@@ -1133,16 +1133,10 @@ static void print_cable_info(struct snd_info_entry *entry,
static int loopback_proc_new(struct loopback *loopback, int cidx)
{
char name[32];
- struct snd_info_entry *entry;
- int err;
snprintf(name, sizeof(name), "cable#%d", cidx);
- err = snd_card_proc_new(loopback->card, name, &entry);
- if (err < 0)
- return err;
-
- snd_info_set_text_ops(entry, loopback, print_cable_info);
- return 0;
+ return snd_card_ro_proc_new(loopback->card, name, loopback,
+ print_cable_info);
}
static int loopback_probe(struct platform_device *devptr)