Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / sound / core / seq / seq_ports.c
index 2ef8fb5..8c64b58 100644 (file)
@@ -221,7 +221,6 @@ static void clear_subscriber_list(struct snd_seq_client *client,
 {
        struct list_head *p, *n;
 
-       down_write(&grp->list_mutex);
        list_for_each_safe(p, n, &grp->list_head) {
                struct snd_seq_subscribers *subs;
                struct snd_seq_client *c;
@@ -259,7 +258,6 @@ static void clear_subscriber_list(struct snd_seq_client *client,
                        snd_seq_client_unlock(c);
                }
        }
-       up_write(&grp->list_mutex);
 }
 
 /* delete port data */
@@ -516,7 +514,7 @@ int snd_seq_port_connect(struct snd_seq_client *connector,
        atomic_set(&subs->ref_count, 2);
 
        down_write(&src->list_mutex);
-       down_write(&dest->list_mutex);
+       down_write_nested(&dest->list_mutex, SINGLE_DEPTH_NESTING);
 
        exclusive = info->flags & SNDRV_SEQ_PORT_SUBS_EXCLUSIVE ? 1 : 0;
        err = -EBUSY;
@@ -589,7 +587,7 @@ int snd_seq_port_disconnect(struct snd_seq_client *connector,
        unsigned long flags;
 
        down_write(&src->list_mutex);
-       down_write(&dest->list_mutex);
+       down_write_nested(&dest->list_mutex, SINGLE_DEPTH_NESTING);
 
        /* look for the connection */
        list_for_each(p, &src->list_head) {
@@ -675,6 +673,7 @@ int snd_seq_event_port_attach(int client,
        return ret;
 }
 
+EXPORT_SYMBOL(snd_seq_event_port_attach);
 
 /*
  * Detach the driver from a port.
@@ -694,3 +693,5 @@ int snd_seq_event_port_detach(int client, int port)
 
        return err;
 }
+
+EXPORT_SYMBOL(snd_seq_event_port_detach);