Skip to content
Commit 3103c08f authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: control: Consolidate helpers for adding and replacing ctl elements



Both snd_ctl_add() and snd_ctl_replace() process the things in a
fairly similar way, and indeed the most of the codes can be unified.

This patch is a refactoring to consolidate the both functions to call
a single helper with an extra "mode" argument.  There should be no
functional difference, except for one additional sanity check applied
now to snd_ctl_replace() (which was rather overlooking, IMO), too.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5f2ad594
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