aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_clientmgr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sound/core/seq/seq_clientmgr.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 7d4640d1fe9f..933bde3843d9 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -203,7 +203,6 @@ int __init client_init_data(void)
static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
{
- unsigned long flags;
int c;
struct snd_seq_client *client;
@@ -224,7 +223,7 @@ static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
mutex_init(&client->ioctl_mutex);
/* find free slot in the client table */
- spin_lock_irqsave(&clients_lock, flags);
+ spin_lock_irq(&clients_lock);
if (client_index < 0) {
for (c = SNDRV_SEQ_DYNAMIC_CLIENTS_BEGIN;
c < SNDRV_SEQ_MAX_CLIENTS;
@@ -232,17 +231,17 @@ static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
if (clienttab[c] || clienttablock[c])
continue;
clienttab[client->number = c] = client;
- spin_unlock_irqrestore(&clients_lock, flags);
+ spin_unlock_irq(&clients_lock);
return client;
}
} else {
if (clienttab[client_index] == NULL && !clienttablock[client_index]) {
clienttab[client->number = client_index] = client;
- spin_unlock_irqrestore(&clients_lock, flags);
+ spin_unlock_irq(&clients_lock);
return client;
}
}
- spin_unlock_irqrestore(&clients_lock, flags);
+ spin_unlock_irq(&clients_lock);
snd_seq_pool_delete(&client->pool);
kfree(client);
return NULL; /* no free slot found or busy, return failure code */
@@ -251,23 +250,21 @@ static struct snd_seq_client *seq_create_client1(int client_index, int poolsize)
static int seq_free_client1(struct snd_seq_client *client)
{
- unsigned long flags;
-
if (!client)
return 0;
- spin_lock_irqsave(&clients_lock, flags);
+ spin_lock_irq(&clients_lock);
clienttablock[client->number] = 1;
clienttab[client->number] = NULL;
- spin_unlock_irqrestore(&clients_lock, flags);
+ spin_unlock_irq(&clients_lock);
snd_seq_delete_all_ports(client);
snd_seq_queue_client_leave(client->number);
snd_use_lock_sync(&client->use_lock);
snd_seq_queue_client_termination(client->number);
if (client->pool)
snd_seq_pool_delete(&client->pool);
- spin_lock_irqsave(&clients_lock, flags);
+ spin_lock_irq(&clients_lock);
clienttablock[client->number] = 0;
- spin_unlock_irqrestore(&clients_lock, flags);
+ spin_unlock_irq(&clients_lock);
return 0;
}