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>
This commit is contained in:
Takashi Iwai 2014-02-04 18:24:04 +01:00
parent 04cc79a048
commit bb343e7969
5 changed files with 18 additions and 18 deletions

View File

@ -226,14 +226,14 @@ register_device(void)
if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER,
NULL, 0, NULL, 0,
&seq_oss_f_ops, NULL)) < 0) { &seq_oss_f_ops, NULL)) < 0) {
snd_printk(KERN_ERR "can't register device seq\n"); pr_err("ALSA: seq_oss: can't register device seq\n");
mutex_unlock(&register_mutex); mutex_unlock(&register_mutex);
return rc; return rc;
} }
if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC, if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC,
NULL, 0, NULL, 0,
&seq_oss_f_ops, NULL)) < 0) { &seq_oss_f_ops, NULL)) < 0) {
snd_printk(KERN_ERR "can't register device music\n"); pr_err("ALSA: seq_oss: can't register device music\n");
snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0); snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0);
mutex_unlock(&register_mutex); mutex_unlock(&register_mutex);
return rc; return rc;
@ -247,9 +247,9 @@ unregister_device(void)
{ {
mutex_lock(&register_mutex); mutex_lock(&register_mutex);
if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC, NULL, 0) < 0) if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC, NULL, 0) < 0)
snd_printk(KERN_ERR "error unregister device music\n"); pr_err("ALSA: seq_oss: error unregister device music\n");
if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0) < 0) if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0) < 0)
snd_printk(KERN_ERR "error unregister device seq\n"); pr_err("ALSA: seq_oss: error unregister device seq\n");
mutex_unlock(&register_mutex); mutex_unlock(&register_mutex);
} }

View File

@ -189,7 +189,7 @@ snd_seq_oss_open(struct file *file, int level)
dp = kzalloc(sizeof(*dp), GFP_KERNEL); dp = kzalloc(sizeof(*dp), GFP_KERNEL);
if (!dp) { if (!dp) {
snd_printk(KERN_ERR "can't malloc device info\n"); pr_err("ALSA: seq_oss: can't malloc device info\n");
return -ENOMEM; return -ENOMEM;
} }
@ -204,7 +204,7 @@ snd_seq_oss_open(struct file *file, int level)
dp->index = i; dp->index = i;
if (i >= SNDRV_SEQ_OSS_MAX_CLIENTS) { if (i >= SNDRV_SEQ_OSS_MAX_CLIENTS) {
snd_printk(KERN_ERR "too many applications\n"); pr_err("ALSA: seq_oss: too many applications\n");
rc = -ENOMEM; rc = -ENOMEM;
goto _error; goto _error;
} }
@ -214,7 +214,7 @@ snd_seq_oss_open(struct file *file, int level)
snd_seq_oss_midi_setup(dp); snd_seq_oss_midi_setup(dp);
if (dp->synth_opened == 0 && dp->max_mididev == 0) { if (dp->synth_opened == 0 && dp->max_mididev == 0) {
/* snd_printk(KERN_ERR "no device found\n"); */ /* pr_err("ALSA: seq_oss: no device found\n"); */
rc = -ENODEV; rc = -ENODEV;
goto _error; goto _error;
} }
@ -222,7 +222,7 @@ snd_seq_oss_open(struct file *file, int level)
/* create port */ /* create port */
rc = create_port(dp); rc = create_port(dp);
if (rc < 0) { if (rc < 0) {
snd_printk(KERN_ERR "can't create port\n"); pr_err("ALSA: seq_oss: can't create port\n");
goto _error; goto _error;
} }
@ -263,7 +263,7 @@ snd_seq_oss_open(struct file *file, int level)
/* initialize timer */ /* initialize timer */
dp->timer = snd_seq_oss_timer_new(dp); dp->timer = snd_seq_oss_timer_new(dp);
if (!dp->timer) { if (!dp->timer) {
snd_printk(KERN_ERR "can't alloc timer\n"); pr_err("ALSA: seq_oss: can't alloc timer\n");
rc = -ENOMEM; rc = -ENOMEM;
goto _error; goto _error;
} }
@ -390,7 +390,7 @@ delete_seq_queue(int queue)
qinfo.queue = queue; qinfo.queue = queue;
rc = call_ctl(SNDRV_SEQ_IOCTL_DELETE_QUEUE, &qinfo); rc = call_ctl(SNDRV_SEQ_IOCTL_DELETE_QUEUE, &qinfo);
if (rc < 0) if (rc < 0)
printk(KERN_ERR "seq-oss: unable to delete queue %d (%d)\n", queue, rc); pr_err("ALSA: seq_oss: unable to delete queue %d (%d)\n", queue, rc);
return rc; return rc;
} }

View File

@ -174,7 +174,7 @@ snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo)
* allocate midi info record * allocate midi info record
*/ */
if ((mdev = kzalloc(sizeof(*mdev), GFP_KERNEL)) == NULL) { if ((mdev = kzalloc(sizeof(*mdev), GFP_KERNEL)) == NULL) {
snd_printk(KERN_ERR "can't malloc midi info\n"); pr_err("ALSA: seq_oss: can't malloc midi info\n");
return -ENOMEM; return -ENOMEM;
} }
@ -190,7 +190,7 @@ snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo)
/* create MIDI coder */ /* create MIDI coder */
if (snd_midi_event_new(MAX_MIDI_EVENT_BUF, &mdev->coder) < 0) { if (snd_midi_event_new(MAX_MIDI_EVENT_BUF, &mdev->coder) < 0) {
snd_printk(KERN_ERR "can't malloc midi coder\n"); pr_err("ALSA: seq_oss: can't malloc midi coder\n");
kfree(mdev); kfree(mdev);
return -ENOMEM; return -ENOMEM;
} }

View File

@ -48,12 +48,12 @@ snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen)
struct seq_oss_readq *q; struct seq_oss_readq *q;
if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) { if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) {
snd_printk(KERN_ERR "can't malloc read queue\n"); pr_err("ALSA: seq_oss: can't malloc read queue\n");
return NULL; return NULL;
} }
if ((q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL)) == NULL) { if ((q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL)) == NULL) {
snd_printk(KERN_ERR "can't malloc read queue buffer\n"); pr_err("ALSA: seq_oss: can't malloc read queue buffer\n");
kfree(q); kfree(q);
return NULL; return NULL;
} }

View File

@ -106,7 +106,7 @@ snd_seq_oss_synth_register(struct snd_seq_device *dev)
unsigned long flags; unsigned long flags;
if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) { if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) {
snd_printk(KERN_ERR "can't malloc synth info\n"); pr_err("ALSA: seq_oss: can't malloc synth info\n");
return -ENOMEM; return -ENOMEM;
} }
rec->seq_device = -1; rec->seq_device = -1;
@ -130,7 +130,7 @@ snd_seq_oss_synth_register(struct snd_seq_device *dev)
if (i >= max_synth_devs) { if (i >= max_synth_devs) {
if (max_synth_devs >= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS) { if (max_synth_devs >= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS) {
spin_unlock_irqrestore(&register_lock, flags); spin_unlock_irqrestore(&register_lock, flags);
snd_printk(KERN_ERR "no more synth slot\n"); pr_err("ALSA: seq_oss: no more synth slot\n");
kfree(rec); kfree(rec);
return -ENOMEM; return -ENOMEM;
} }
@ -162,7 +162,7 @@ snd_seq_oss_synth_unregister(struct snd_seq_device *dev)
} }
if (index >= max_synth_devs) { if (index >= max_synth_devs) {
spin_unlock_irqrestore(&register_lock, flags); spin_unlock_irqrestore(&register_lock, flags);
snd_printk(KERN_ERR "can't unregister synth\n"); pr_err("ALSA: seq_oss: can't unregister synth\n");
return -EINVAL; return -EINVAL;
} }
synth_devs[index] = NULL; synth_devs[index] = NULL;
@ -247,7 +247,7 @@ snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp)
if (info->nr_voices > 0) { if (info->nr_voices > 0) {
info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL); info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL);
if (!info->ch) { if (!info->ch) {
snd_printk(KERN_ERR "Cannot malloc\n"); pr_err("ALSA: seq_oss: Cannot malloc voices\n");
rec->oper.close(&info->arg); rec->oper.close(&info->arg);
module_put(rec->oper.owner); module_put(rec->oper.owner);
snd_use_lock_free(&rec->use_lock); snd_use_lock_free(&rec->use_lock);