summaryrefslogtreecommitdiffstats
path: root/sound/drivers/dummy.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/dummy.c
parent7453e1dafdec076f87384c8647d2960affd57ecc (diff)
downloadlinux-815d808c7bfc91edbf25813cea54709f4a805c71.tar.bz2
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/dummy.c')
-rw-r--r--sound/drivers/dummy.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index c8d31550e9a1..2672c2e13334 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -1037,14 +1037,8 @@ static void dummy_proc_write(struct snd_info_entry *entry,
static void dummy_proc_init(struct snd_dummy *chip)
{
- struct snd_info_entry *entry;
-
- if (!snd_card_proc_new(chip->card, "dummy_pcm", &entry)) {
- snd_info_set_text_ops(entry, chip, dummy_proc_read);
- entry->c.text.write = dummy_proc_write;
- entry->mode |= 0200;
- entry->private_data = chip;
- }
+ snd_card_rw_proc_new(chip->card, "dummy_pcm", chip,
+ dummy_proc_read, dummy_proc_write);
}
#else
#define dummy_proc_init(x)