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];
-}
-
-