X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fcore%2Fseq%2Foss%2Fseq_oss_init.c;h=9f245c9994187939597fbf85c448d9da4dafc6e2;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=c8b199dc1a2bdf63f93aa92ddccbe3461a00ec79;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c index c8b199dc1..9f245c999 100644 --- a/sound/core/seq/oss/seq_oss_init.c +++ b/sound/core/seq/oss/seq_oss_init.c @@ -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]; -} - -