• Takashi Iwai's avatar
    ALSA: control: Consolidate helpers for adding and replacing ctl elements · 3103c08f
    Takashi Iwai authored
    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>
    3103c08f
control.c 50.9 KB