diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-05 02:33:21 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-05 03:14:45 -0400 |
commit | 3a4a7ef5678416b04927102f85998e38b52f7196 (patch) | |
tree | 8bd2a742123828812dad74e6ecb6cc65ffb65eca | |
parent | 2b58fd5b3193fd3af3d15114d95706087d25a7fe (diff) |
ALSA: opl4: use list_move_tail instead of list_del/list_add_tail
Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/drivers/opl4/opl4_synth.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/drivers/opl4/opl4_synth.c b/sound/drivers/opl4/opl4_synth.c index 49b9e240915c..4b91adc0238c 100644 --- a/sound/drivers/opl4/opl4_synth.c +++ b/sound/drivers/opl4/opl4_synth.c | |||
@@ -504,8 +504,7 @@ void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_cha | |||
504 | spin_lock_irqsave(&opl4->reg_lock, flags); | 504 | spin_lock_irqsave(&opl4->reg_lock, flags); |
505 | for (i = 0; i < voices; i++) { | 505 | for (i = 0; i < voices; i++) { |
506 | voice[i] = snd_opl4_get_voice(opl4); | 506 | voice[i] = snd_opl4_get_voice(opl4); |
507 | list_del(&voice[i]->list); | 507 | list_move_tail(&voice[i]->list, &opl4->on_voices); |
508 | list_add_tail(&voice[i]->list, &opl4->on_voices); | ||
509 | voice[i]->chan = chan; | 508 | voice[i]->chan = chan; |
510 | voice[i]->note = note; | 509 | voice[i]->note = note; |
511 | voice[i]->velocity = vel & 0x7f; | 510 | voice[i]->velocity = vel & 0x7f; |
@@ -555,8 +554,7 @@ void snd_opl4_note_on(void *private_data, int note, int vel, struct snd_midi_cha | |||
555 | 554 | ||
556 | static void snd_opl4_voice_off(struct snd_opl4 *opl4, struct opl4_voice *voice) | 555 | static void snd_opl4_voice_off(struct snd_opl4 *opl4, struct opl4_voice *voice) |
557 | { | 556 | { |
558 | list_del(&voice->list); | 557 | list_move_tail(&voice->list, &opl4->off_voices); |
559 | list_add_tail(&voice->list, &opl4->off_voices); | ||
560 | 558 | ||
561 | voice->reg_misc &= ~OPL4_KEY_ON_BIT; | 559 | voice->reg_misc &= ~OPL4_KEY_ON_BIT; |
562 | snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc); | 560 | snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc); |
@@ -571,8 +569,7 @@ void snd_opl4_note_off(void *private_data, int note, int vel, struct snd_midi_ch | |||
571 | 569 | ||
572 | static void snd_opl4_terminate_voice(struct snd_opl4 *opl4, struct opl4_voice *voice) | 570 | static void snd_opl4_terminate_voice(struct snd_opl4 *opl4, struct opl4_voice *voice) |
573 | { | 571 | { |
574 | list_del(&voice->list); | 572 | list_move_tail(&voice->list, &opl4->off_voices); |
575 | list_add_tail(&voice->list, &opl4->off_voices); | ||
576 | 573 | ||
577 | voice->reg_misc = (voice->reg_misc & ~OPL4_KEY_ON_BIT) | OPL4_DAMP_BIT; | 574 | voice->reg_misc = (voice->reg_misc & ~OPL4_KEY_ON_BIT) | OPL4_DAMP_BIT; |
578 | snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc); | 575 | snd_opl4_write(opl4, OPL4_REG_MISC + voice->number, voice->reg_misc); |