#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];
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;
}
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;
}
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
*/
}
}
-/*
- * 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];
-}
-
-