aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-06-27 07:07:04 -0400
committerJaroslav Kysela <perex@suse.cz>2006-06-28 13:31:00 -0400
commitbe7ee27822975cee5dabb2cfd7f03e7fde38e3f4 (patch)
treee8a89665fc2a66ab3710b651e247eff9c164e82d /sound
parentb2e1b0cc729ebbf27713a64a32c49e27fa81e600 (diff)
[ALSA] Fix misuse of __list_add() in seq_ports.c
seq_ports.c::snd_seq_delete_all_ports() uses __list_add() to replace the whole list entries. This results in BUG() with recent FC5 kernel due to a sanity check in __list_add(). The patch fixes this misue of __list_add() by using standard macros instead (although a bit more code is needed). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/seq/seq_ports.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c
index 334579a9f268..d467b4f0ff2b 100644
--- a/sound/core/seq/seq_ports.c
+++ b/sound/core/seq/seq_ports.c
@@ -322,10 +322,8 @@ int snd_seq_delete_all_ports(struct snd_seq_client *client)
322 mutex_lock(&client->ports_mutex); 322 mutex_lock(&client->ports_mutex);
323 write_lock_irqsave(&client->ports_lock, flags); 323 write_lock_irqsave(&client->ports_lock, flags);
324 if (! list_empty(&client->ports_list_head)) { 324 if (! list_empty(&client->ports_list_head)) {
325 __list_add(&deleted_list, 325 list_add(&deleted_list, &client->ports_list_head);
326 client->ports_list_head.prev, 326 list_del_init(&client->ports_list_head);
327 client->ports_list_head.next);
328 INIT_LIST_HEAD(&client->ports_list_head);
329 } else { 327 } else {
330 INIT_LIST_HEAD(&deleted_list); 328 INIT_LIST_HEAD(&deleted_list);
331 } 329 }