aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_ports.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sound/core/seq/seq_ports.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sound/core/seq/seq_ports.c b/sound/core/seq/seq_ports.c
index 24d90abfc64d..1e2239240f21 100644
--- a/sound/core/seq/seq_ports.c
+++ b/sound/core/seq/seq_ports.c
@@ -128,7 +128,6 @@ static void port_subs_info_init(struct snd_seq_port_subs_info *grp)
struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
int port)
{
- unsigned long flags;
struct snd_seq_client_port *new_port, *p;
int num = -1;
@@ -157,7 +156,7 @@ struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
num = port >= 0 ? port : 0;
mutex_lock(&client->ports_mutex);
- write_lock_irqsave(&client->ports_lock, flags);
+ write_lock_irq(&client->ports_lock);
list_for_each_entry(p, &client->ports_list_head, list) {
if (p->addr.port > num)
break;
@@ -169,7 +168,7 @@ struct snd_seq_client_port *snd_seq_create_port(struct snd_seq_client *client,
client->num_ports++;
new_port->addr.port = num; /* store the port number in the port */
sprintf(new_port->name, "port-%d", num);
- write_unlock_irqrestore(&client->ports_lock, flags);
+ write_unlock_irq(&client->ports_lock);
mutex_unlock(&client->ports_mutex);
return new_port;
@@ -283,11 +282,10 @@ static int port_delete(struct snd_seq_client *client,
/* delete a port with the given port id */
int snd_seq_delete_port(struct snd_seq_client *client, int port)
{
- unsigned long flags;
struct snd_seq_client_port *found = NULL, *p;
mutex_lock(&client->ports_mutex);
- write_lock_irqsave(&client->ports_lock, flags);
+ write_lock_irq(&client->ports_lock);
list_for_each_entry(p, &client->ports_list_head, list) {
if (p->addr.port == port) {
/* ok found. delete from the list at first */
@@ -297,7 +295,7 @@ int snd_seq_delete_port(struct snd_seq_client *client, int port)
break;
}
}
- write_unlock_irqrestore(&client->ports_lock, flags);
+ write_unlock_irq(&client->ports_lock);
mutex_unlock(&client->ports_mutex);
if (found)
return port_delete(client, found);
@@ -308,7 +306,6 @@ int snd_seq_delete_port(struct snd_seq_client *client, int port)
/* delete the all ports belonging to the given client */
int snd_seq_delete_all_ports(struct snd_seq_client *client)
{
- unsigned long flags;
struct list_head deleted_list;
struct snd_seq_client_port *port, *tmp;
@@ -316,7 +313,7 @@ int snd_seq_delete_all_ports(struct snd_seq_client *client)
* clear the port list in the client data.
*/
mutex_lock(&client->ports_mutex);
- write_lock_irqsave(&client->ports_lock, flags);
+ write_lock_irq(&client->ports_lock);
if (! list_empty(&client->ports_list_head)) {
list_add(&deleted_list, &client->ports_list_head);
list_del_init(&client->ports_list_head);
@@ -324,7 +321,7 @@ int snd_seq_delete_all_ports(struct snd_seq_client *client)
INIT_LIST_HEAD(&deleted_list);
}
client->num_ports = 0;
- write_unlock_irqrestore(&client->ports_lock, flags);
+ write_unlock_irq(&client->ports_lock);
/* remove each port in deleted_list */
list_for_each_entry_safe(port, tmp, &deleted_list, list) {