• Takashi Iwai's avatar
    ALSA: timer: Use guard() for locking · beb45974
    Takashi Iwai authored
    We can simplify the code gracefully with new guard() macro and co for
    automatic cleanup of locks.
    
    For making changes easier, some functions widen the application of
    register_mutex, but those shouldn't influence on any actual
    performance.
    
    Also, one code block was factored out as a function so that guard()
    can be applied cleanly without much indentation.
    
    There are still a few remaining explicit spin_lock/unlock calls, and
    those are for the places where we do temporary unlock/relock, which
    doesn't fit well with the guard(), so far.
    
    Only the code refactoring, and no functional changes.
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Link: https://lore.kernel.org/r/20240227085306.9764-4-tiwai@suse.de
    beb45974
timer.c 57 KB