vserver 1.9.3
[linux-2.6.git] / sound / core / seq / oss / seq_oss_init.c
index 7bb54d2..cecf3f8 100644 (file)
 #include "seq_oss_timer.h"
 #include "seq_oss_event.h"
 #include <linux/init.h>
+#include <linux/moduleparam.h>
 
 /*
  * common variables
  */
-MODULE_PARM(maxqlen, "i");
+static int maxqlen = SNDRV_SEQ_OSS_MAX_QLEN;
+module_param(maxqlen, int, 0444);
 MODULE_PARM_DESC(maxqlen, "maximum queue length");
 
 static int system_client = -1; /* ALSA sequencer client number */
 static int system_port = -1;
 
-int maxqlen = SNDRV_SEQ_OSS_MAX_QLEN;
 static int num_clients;
 static seq_oss_devinfo_t *client_table[SNDRV_SEQ_OSS_MAX_CLIENTS];
 
@@ -182,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;
        }
@@ -210,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;
        }