diff options
author | Nicolas Kaiser <nikai@nikai.net> | 2011-03-16 17:10:11 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-16 17:35:16 +0100 |
commit | 5b7c757d1a8878d49f46c826d6081816935664aa (patch) | |
tree | e34f05ead064127f8d1327a763fbb840bb343a36 /sound | |
parent | 9d4ed9e0771767a110dafffdeb0963e852fd6ae4 (diff) | |
download | linux-5b7c757d1a8878d49f46c826d6081816935664aa.tar.bz2 |
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')
-rw-r--r-- | sound/core/timer.c | 8 |
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) list_for_each_entry(master, &timer->open_list_head, open_list) { if (slave->slave_class == master->slave_class && slave->slave_id == master->slave_id) { - list_del(&slave->open_list); - list_add_tail(&slave->open_list, - &master->slave_list_head); + list_move_tail(&slave->open_list, + &master->slave_list_head); spin_lock_irq(&slave_active_lock); slave->master = master; slave->timer = master->timer; @@ -414,8 +413,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event) static int snd_timer_start1(struct snd_timer *timer, struct snd_timer_instance *timeri, unsigned long sticks) { - list_del(&timeri->active_list); - list_add_tail(&timeri->active_list, &timer->active_list_head); + list_move_tail(&timeri->active_list, &timer->active_list_head); if (timer->running) { if (timer->hw.flags & SNDRV_TIMER_HW_SLAVE) goto __start_now; |