fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / sound / drivers / opl4 / opl4_proc.c
index f4b4e74..1679300 100644 (file)
@@ -28,13 +28,13 @@ static int snd_opl4_mem_proc_open(struct snd_info_entry *entry,
 {
        struct snd_opl4 *opl4 = entry->private_data;
 
-       down(&opl4->access_mutex);
+       mutex_lock(&opl4->access_mutex);
        if (opl4->memory_access) {
-               up(&opl4->access_mutex);
+               mutex_unlock(&opl4->access_mutex);
                return -EBUSY;
        }
        opl4->memory_access++;
-       up(&opl4->access_mutex);
+       mutex_unlock(&opl4->access_mutex);
        return 0;
 }
 
@@ -43,9 +43,9 @@ static int snd_opl4_mem_proc_release(struct snd_info_entry *entry,
 {
        struct snd_opl4 *opl4 = entry->private_data;
 
-       down(&opl4->access_mutex);
+       mutex_lock(&opl4->access_mutex);
        opl4->memory_access--;
-       up(&opl4->access_mutex);
+       mutex_unlock(&opl4->access_mutex);
        return 0;
 }
 
@@ -105,13 +105,13 @@ static long long snd_opl4_mem_proc_llseek(struct snd_info_entry *entry, void *fi
                                          struct file *file, long long offset, int orig)
 {
        switch (orig) {
-       case 0: /* SEEK_SET */
+       case SEEK_SET:
                file->f_pos = offset;
                break;
-       case 1: /* SEEK_CUR */
+       case SEEK_CUR:
                file->f_pos += offset;
                break;
-       case 2: /* SEEK_END, offset is negative */
+       case SEEK_END: /* offset is negative */
                file->f_pos = entry->size + offset;
                break;
        default:
@@ -159,8 +159,7 @@ int snd_opl4_create_proc(struct snd_opl4 *opl4)
 
 void snd_opl4_free_proc(struct snd_opl4 *opl4)
 {
-       if (opl4->proc_entry)
-               snd_info_unregister(opl4->proc_entry);
+       snd_info_free_entry(opl4->proc_entry);
 }
 
 #endif /* CONFIG_PROC_FS */