diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-04 18:07:35 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-06 20:11:57 +0300 |
commit | 7449054af0dcfa2839bb2da0a393bd35cf08daff (patch) | |
tree | 3b83650e4a1b82e7c922b4658f9d815542386267 /sound/usb/mixer.c | |
parent | 3c6ee77088a9b5188d065780b1c540f5e3d879c8 (diff) | |
download | linux-7449054af0dcfa2839bb2da0a393bd35cf08daff.tar.xz |
ALSA: usb: 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/usb/mixer.c')
-rw-r--r-- | sound/usb/mixer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 8ad1a24c8f28..73d7dff425c1 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -3441,7 +3441,6 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, .dev_free = snd_usb_mixer_dev_free }; struct usb_mixer_interface *mixer; - struct snd_info_entry *entry; int err; strcpy(chip->card->mixername, "USB Mixer"); @@ -3497,9 +3496,9 @@ int snd_usb_create_mixer(struct snd_usb_audio *chip, int ctrlif, if (err < 0) goto _error; - if (list_empty(&chip->mixer_list) && - !snd_card_proc_new(chip->card, "usbmixer", &entry)) - snd_info_set_text_ops(entry, chip, snd_usb_mixer_proc_read); + if (list_empty(&chip->mixer_list)) + snd_card_ro_proc_new(chip->card, "usbmixer", chip, + snd_usb_mixer_proc_read); list_add(&mixer->list, &chip->mixer_list); return 0; |