vserver 1.9.5.x5
[linux-2.6.git] / sound / core / seq / oss / seq_oss_init.c
index c8b199d..9f245c9 100644 (file)
@@ -183,7 +183,7 @@ snd_seq_oss_open(struct file *file, int level)
        int i, rc;
        seq_oss_devinfo_t *dp;
 
-       if ((dp = snd_kcalloc(sizeof(*dp), GFP_KERNEL)) == NULL) {
+       if ((dp = kcalloc(1, sizeof(*dp), GFP_KERNEL)) == NULL) {
                snd_printk(KERN_ERR "can't malloc device info\n");
                return -ENOMEM;
        }
@@ -211,7 +211,7 @@ snd_seq_oss_open(struct file *file, int level)
        snd_seq_oss_midi_setup(dp);
 
        if (dp->synth_opened == 0 && dp->max_mididev == 0) {
-               snd_printk(KERN_ERR "no device found\n");
+               /* snd_printk(KERN_ERR "no device found\n"); */
                rc = -ENODEV;
                goto _error;
        }
@@ -491,6 +491,26 @@ snd_seq_oss_reset(seq_oss_devinfo_t *dp)
        snd_seq_oss_timer_stop(dp->timer);
 }
 
+
+/*
+ * misc. functions for proc interface
+ */
+char *
+enabled_str(int bool)
+{
+       return bool ? "enabled" : "disabled";
+}
+
+static char *
+filemode_str(int val)
+{
+       static char *str[] = {
+               "none", "read", "write", "read/write",
+       };
+       return str[val & SNDRV_SEQ_OSS_FILE_ACMODE];
+}
+
+
 /*
  * proc interface
  */
@@ -523,22 +543,3 @@ snd_seq_oss_system_info_read(snd_info_buffer_t *buf)
        }
 }
 
-/*
- * misc. functions for proc interface
- */
-char *
-enabled_str(int bool)
-{
-       return bool ? "enabled" : "disabled";
-}
-
-char *
-filemode_str(int val)
-{
-       static char *str[] = {
-               "none", "read", "write", "read/write",
-       };
-       return str[val & SNDRV_SEQ_OSS_FILE_ACMODE];
-}
-
-