if (info->voices > 32)
return -EINVAL;
- mutex_lock(&gus->register_mutex);
+ down(&gus->register_mutex);
if (!snd_gus_use_inc(gus)) {
- mutex_unlock(&gus->register_mutex);
+ up(&gus->register_mutex);
return -EFAULT;
}
for (idx = 0; idx < info->voices; idx++) {
if (voice == NULL) {
snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port);
snd_gus_use_dec(gus);
- mutex_unlock(&gus->register_mutex);
+ up(&gus->register_mutex);
return -EBUSY;
}
voice->index = idx;
}
- mutex_unlock(&gus->register_mutex);
+ up(&gus->register_mutex);
return 0;
}
struct snd_gus_port * port = private_data;
struct snd_gus_card * gus = port->gus;
- mutex_lock(&gus->register_mutex);
+ down(&gus->register_mutex);
snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port);
snd_gus_use_dec(gus);
- mutex_unlock(&gus->register_mutex);
+ up(&gus->register_mutex);
return 0;
}
if (gus == NULL)
return -EINVAL;
- mutex_init(&gus->register_mutex);
+ init_MUTEX(&gus->register_mutex);
gus->gf1.seq_client = -1;
/* allocate new client */