aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/timer.c
diff options
context:
space:
mode:
authorNicolas Kaiser <nikai@nikai.net>2011-03-16 12:10:11 -0400
committerTakashi Iwai <tiwai@suse.de>2011-03-16 12:35:16 -0400
commit5b7c757d1a8878d49f46c826d6081816935664aa (patch)
treee34f05ead064127f8d1327a763fbb840bb343a36 /sound/core/timer.c
parent9d4ed9e0771767a110dafffdeb0963e852fd6ae4 (diff)
ALSA: sound/core: merge list_del()/list_add_tail() to list_move_tail()
Merge list_del() + list_add_tail() to list_move_tail(). Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/timer.c')
-rw-r--r--sound/core/timer.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sound/core/timer.c b/sound/core/timer.c
index ed016329e911..7c1cbf0a0dc4 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -186,9 +186,8 @@ static void snd_timer_check_slave(struct snd_timer_instance *slave)
186 list_for_each_entry(master, &timer->open_list_head, open_list) { 186 list_for_each_entry(master, &timer->open_list_head, open_list) {
187 if (slave->slave_class == master->slave_class && 187 if (slave->slave_class == master->slave_class &&
188 slave->slave_id == master->slave_id) { 188 slave->slave_id == master->slave_id) {
189 list_del(&slave->open_list); 189 list_move_tail(&slave->open_list,
190 list_add_tail(&slave->open_list, 190 &master->slave_list_head);
191 &master->slave_list_head);
192 spin_lock_irq(&slave_active_lock); 191 spin_lock_irq(&slave_active_lock);
193 slave->master = master; 192 slave->master = master;
194 slave->timer = master->timer; 193 slave->timer = master->timer;
@@ -414,8 +413,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
414static int snd_timer_start1(struct snd_timer *timer, struct snd_timer_instance *timeri, 413static int snd_timer_start1(struct snd_timer *timer, struct snd_timer_instance *timeri,
415 unsigned long sticks) 414 unsigned long sticks)
416{ 415{
417 list_del(&timeri->active_list); 416 list_move_tail(&timeri->active_list, &timer->active_list_head);
418 list_add_tail(&timeri->active_list, &timer->active_list_head);
419 if (timer->running) { 417 if (timer->running) {
420 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) 418 if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE)
421 goto __start_now; 419 goto __start_now;