Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: seq_oss: Use standard printk helpers

Use the standard pr_xxx() helpers instead of home-baked snd_print*().

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+18 -18
+4 -4
sound/core/seq/oss/seq_oss.c
··· 226 226 if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, 227 227 NULL, 0, 228 228 &seq_oss_f_ops, NULL)) < 0) { 229 - snd_printk(KERN_ERR "can't register device seq\n"); 229 + pr_err("ALSA: seq_oss: can't register device seq\n"); 230 230 mutex_unlock(&register_mutex); 231 231 return rc; 232 232 } 233 233 if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC, 234 234 NULL, 0, 235 235 &seq_oss_f_ops, NULL)) < 0) { 236 - snd_printk(KERN_ERR "can't register device music\n"); 236 + pr_err("ALSA: seq_oss: can't register device music\n"); 237 237 snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0); 238 238 mutex_unlock(&register_mutex); 239 239 return rc; ··· 247 247 { 248 248 mutex_lock(&register_mutex); 249 249 if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC, NULL, 0) < 0) 250 - snd_printk(KERN_ERR "error unregister device music\n"); 250 + pr_err("ALSA: seq_oss: error unregister device music\n"); 251 251 if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0) < 0) 252 - snd_printk(KERN_ERR "error unregister device seq\n"); 252 + pr_err("ALSA: seq_oss: error unregister device seq\n"); 253 253 mutex_unlock(&register_mutex); 254 254 } 255 255
+6 -6
sound/core/seq/oss/seq_oss_init.c
··· 189 189 190 190 dp = kzalloc(sizeof(*dp), GFP_KERNEL); 191 191 if (!dp) { 192 - snd_printk(KERN_ERR "can't malloc device info\n"); 192 + pr_err("ALSA: seq_oss: can't malloc device info\n"); 193 193 return -ENOMEM; 194 194 } 195 195 ··· 204 204 205 205 dp->index = i; 206 206 if (i >= SNDRV_SEQ_OSS_MAX_CLIENTS) { 207 - snd_printk(KERN_ERR "too many applications\n"); 207 + pr_err("ALSA: seq_oss: too many applications\n"); 208 208 rc = -ENOMEM; 209 209 goto _error; 210 210 } ··· 214 214 snd_seq_oss_midi_setup(dp); 215 215 216 216 if (dp->synth_opened == 0 && dp->max_mididev == 0) { 217 - /* snd_printk(KERN_ERR "no device found\n"); */ 217 + /* pr_err("ALSA: seq_oss: no device found\n"); */ 218 218 rc = -ENODEV; 219 219 goto _error; 220 220 } ··· 222 222 /* create port */ 223 223 rc = create_port(dp); 224 224 if (rc < 0) { 225 - snd_printk(KERN_ERR "can't create port\n"); 225 + pr_err("ALSA: seq_oss: can't create port\n"); 226 226 goto _error; 227 227 } 228 228 ··· 263 263 /* initialize timer */ 264 264 dp->timer = snd_seq_oss_timer_new(dp); 265 265 if (!dp->timer) { 266 - snd_printk(KERN_ERR "can't alloc timer\n"); 266 + pr_err("ALSA: seq_oss: can't alloc timer\n"); 267 267 rc = -ENOMEM; 268 268 goto _error; 269 269 } ··· 390 390 qinfo.queue = queue; 391 391 rc = call_ctl(SNDRV_SEQ_IOCTL_DELETE_QUEUE, &qinfo); 392 392 if (rc < 0) 393 - printk(KERN_ERR "seq-oss: unable to delete queue %d (%d)\n", queue, rc); 393 + pr_err("ALSA: seq_oss: unable to delete queue %d (%d)\n", queue, rc); 394 394 return rc; 395 395 } 396 396
+2 -2
sound/core/seq/oss/seq_oss_midi.c
··· 174 174 * allocate midi info record 175 175 */ 176 176 if ((mdev = kzalloc(sizeof(*mdev), GFP_KERNEL)) == NULL) { 177 - snd_printk(KERN_ERR "can't malloc midi info\n"); 177 + pr_err("ALSA: seq_oss: can't malloc midi info\n"); 178 178 return -ENOMEM; 179 179 } 180 180 ··· 190 190 191 191 /* create MIDI coder */ 192 192 if (snd_midi_event_new(MAX_MIDI_EVENT_BUF, &mdev->coder) < 0) { 193 - snd_printk(KERN_ERR "can't malloc midi coder\n"); 193 + pr_err("ALSA: seq_oss: can't malloc midi coder\n"); 194 194 kfree(mdev); 195 195 return -ENOMEM; 196 196 }
+2 -2
sound/core/seq/oss/seq_oss_readq.c
··· 48 48 struct seq_oss_readq *q; 49 49 50 50 if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) { 51 - snd_printk(KERN_ERR "can't malloc read queue\n"); 51 + pr_err("ALSA: seq_oss: can't malloc read queue\n"); 52 52 return NULL; 53 53 } 54 54 55 55 if ((q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL)) == NULL) { 56 - snd_printk(KERN_ERR "can't malloc read queue buffer\n"); 56 + pr_err("ALSA: seq_oss: can't malloc read queue buffer\n"); 57 57 kfree(q); 58 58 return NULL; 59 59 }
+4 -4
sound/core/seq/oss/seq_oss_synth.c
··· 106 106 unsigned long flags; 107 107 108 108 if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) { 109 - snd_printk(KERN_ERR "can't malloc synth info\n"); 109 + pr_err("ALSA: seq_oss: can't malloc synth info\n"); 110 110 return -ENOMEM; 111 111 } 112 112 rec->seq_device = -1; ··· 130 130 if (i >= max_synth_devs) { 131 131 if (max_synth_devs >= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS) { 132 132 spin_unlock_irqrestore(&register_lock, flags); 133 - snd_printk(KERN_ERR "no more synth slot\n"); 133 + pr_err("ALSA: seq_oss: no more synth slot\n"); 134 134 kfree(rec); 135 135 return -ENOMEM; 136 136 } ··· 162 162 } 163 163 if (index >= max_synth_devs) { 164 164 spin_unlock_irqrestore(&register_lock, flags); 165 - snd_printk(KERN_ERR "can't unregister synth\n"); 165 + pr_err("ALSA: seq_oss: can't unregister synth\n"); 166 166 return -EINVAL; 167 167 } 168 168 synth_devs[index] = NULL; ··· 247 247 if (info->nr_voices > 0) { 248 248 info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL); 249 249 if (!info->ch) { 250 - snd_printk(KERN_ERR "Cannot malloc\n"); 250 + pr_err("ALSA: seq_oss: Cannot malloc voices\n"); 251 251 rec->oper.close(&info->arg); 252 252 module_put(rec->oper.owner); 253 253 snd_use_lock_free(&rec->use_lock);