ALSA: timer: Unify master/slave linking code
authorTakashi Iwai <tiwai@suse.de>
Thu, 7 Nov 2019 19:20:06 +0000 (20:20 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 8 Nov 2019 13:52:42 +0000 (14:52 +0100)
commitebfc6de29ae8e48f91e280fd37539188b5252b38
tree2361ae9e6dc6507737019d9b22c178c8051082c6
parent66a8966aac12f2a79de514dbbe99c9b3e90c9280
ALSA: timer: Unify master/slave linking code

The code in both snd_timer_check_master() and snd_timer_check_slave()
are almost identical, both check whether the master/slave link and
does linkage.  Factor out the common code and call it from both
functions for readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191107192008.32331-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/timer.c