]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/synth/emux/emux_proc.c
Pull bugzilla-7887 into release branch
[mv-sheeva.git] / sound / synth / emux / emux_proc.c
index a70a179f694739c8d2e995be39804f34eb4c657b..680f2b7fec207158abd4ef28cec6c72364ac9d83 100644 (file)
@@ -20,7 +20,6 @@
 
 #include <sound/driver.h>
 #include <linux/wait.h>
-#include <linux/sched.h>
 #include <linux/slab.h>
 #include <sound/core.h>
 #include <sound/emux_synth.h>
@@ -37,7 +36,7 @@ snd_emux_proc_info_read(struct snd_info_entry *entry,
        int i;
 
        emu = entry->private_data;
-       down(&emu->register_mutex);
+       mutex_lock(&emu->register_mutex);
        if (emu->name)
                snd_iprintf(buf, "Device: %s\n", emu->name);
        snd_iprintf(buf, "Ports: %d\n", emu->num_ports);
@@ -56,13 +55,13 @@ snd_emux_proc_info_read(struct snd_info_entry *entry,
                snd_iprintf(buf, "Memory Size: 0\n");
        }
        if (emu->sflist) {
-               down(&emu->sflist->presets_mutex);
+               mutex_lock(&emu->sflist->presets_mutex);
                snd_iprintf(buf, "SoundFonts: %d\n", emu->sflist->fonts_size);
                snd_iprintf(buf, "Instruments: %d\n", emu->sflist->zone_counter);
                snd_iprintf(buf, "Samples: %d\n", emu->sflist->sample_counter);
                snd_iprintf(buf, "Locked Instruments: %d\n", emu->sflist->zone_locked);
                snd_iprintf(buf, "Locked Samples: %d\n", emu->sflist->sample_locked);
-               up(&emu->sflist->presets_mutex);
+               mutex_unlock(&emu->sflist->presets_mutex);
        }
 #if 0  /* debug */
        if (emu->voices[0].state != SNDRV_EMUX_ST_OFF && emu->voices[0].ch >= 0) {
@@ -103,7 +102,7 @@ snd_emux_proc_info_read(struct snd_info_entry *entry,
                snd_iprintf(buf, "sample_mode=%x, rate=%x\n", vp->reg.sample_mode, vp->reg.rate_offset);
        }
 #endif
-       up(&emu->register_mutex);
+       mutex_unlock(&emu->register_mutex);
 }
 
 
@@ -119,7 +118,6 @@ void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device)
 
        entry->content = SNDRV_INFO_CONTENT_TEXT;
        entry->private_data = emu;
-       entry->c.text.read_size = 1024;
        entry->c.text.read = snd_emux_proc_info_read;
        if (snd_info_register(entry) < 0)
                snd_info_free_entry(entry);
@@ -129,10 +127,8 @@ void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device)
 
 void snd_emux_proc_free(struct snd_emux *emu)
 {
-       if (emu->proc) {
-               snd_info_unregister(emu->proc);
-               emu->proc = NULL;
-       }
+       snd_info_free_entry(emu->proc);
+       emu->proc = NULL;
 }
 
 #endif /* CONFIG_PROC_FS */