aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-04 12:24:04 -0500
committerTakashi Iwai <tiwai@suse.de>2014-02-14 02:14:18 -0500
commitbb343e7969cb8a4b6b20bddc97098c87f4fae2b5 (patch)
tree753fa63b04da919f2c289310e72873ae64aa5abd /sound/core
parent04cc79a048ee215ec39af05d61f1fc8a4ab3d8c1 (diff)
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>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/oss/seq_oss.c8
-rw-r--r--sound/core/seq/oss/seq_oss_init.c12
-rw-r--r--sound/core/seq/oss/seq_oss_midi.c4
-rw-r--r--sound/core/seq/oss/seq_oss_readq.c4
-rw-r--r--sound/core/seq/oss/seq_oss_synth.c8
5 files changed, 18 insertions, 18 deletions
diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c
index 972368abde64..16d42679e43f 100644
--- a/sound/core/seq/oss/seq_oss.c
+++ b/sound/core/seq/oss/seq_oss.c
@@ -226,14 +226,14 @@ register_device(void)
226 if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, 226 if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER,
227 NULL, 0, 227 NULL, 0,
228 &seq_oss_f_ops, NULL)) < 0) { 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 mutex_unlock(&register_mutex); 230 mutex_unlock(&register_mutex);
231 return rc; 231 return rc;
232 } 232 }
233 if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC, 233 if ((rc = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC,
234 NULL, 0, 234 NULL, 0,
235 &seq_oss_f_ops, NULL)) < 0) { 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 snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0); 237 snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0);
238 mutex_unlock(&register_mutex); 238 mutex_unlock(&register_mutex);
239 return rc; 239 return rc;
@@ -247,9 +247,9 @@ unregister_device(void)
247{ 247{
248 mutex_lock(&register_mutex); 248 mutex_lock(&register_mutex);
249 if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MUSIC, NULL, 0) < 0) 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 if (snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_SEQUENCER, NULL, 0) < 0) 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 mutex_unlock(&register_mutex); 253 mutex_unlock(&register_mutex);
254} 254}
255 255
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index b0ac6accf301..b9184d20c39f 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -189,7 +189,7 @@ snd_seq_oss_open(struct file *file, int level)
189 189
190 dp = kzalloc(sizeof(*dp), GFP_KERNEL); 190 dp = kzalloc(sizeof(*dp), GFP_KERNEL);
191 if (!dp) { 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 return -ENOMEM; 193 return -ENOMEM;
194 } 194 }
195 195
@@ -204,7 +204,7 @@ snd_seq_oss_open(struct file *file, int level)
204 204
205 dp->index = i; 205 dp->index = i;
206 if (i >= SNDRV_SEQ_OSS_MAX_CLIENTS) { 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 rc = -ENOMEM; 208 rc = -ENOMEM;
209 goto _error; 209 goto _error;
210 } 210 }
@@ -214,7 +214,7 @@ snd_seq_oss_open(struct file *file, int level)
214 snd_seq_oss_midi_setup(dp); 214 snd_seq_oss_midi_setup(dp);
215 215
216 if (dp->synth_opened == 0 && dp->max_mididev == 0) { 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 rc = -ENODEV; 218 rc = -ENODEV;
219 goto _error; 219 goto _error;
220 } 220 }
@@ -222,7 +222,7 @@ snd_seq_oss_open(struct file *file, int level)
222 /* create port */ 222 /* create port */
223 rc = create_port(dp); 223 rc = create_port(dp);
224 if (rc < 0) { 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 goto _error; 226 goto _error;
227 } 227 }
228 228
@@ -263,7 +263,7 @@ snd_seq_oss_open(struct file *file, int level)
263 /* initialize timer */ 263 /* initialize timer */
264 dp->timer = snd_seq_oss_timer_new(dp); 264 dp->timer = snd_seq_oss_timer_new(dp);
265 if (!dp->timer) { 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 rc = -ENOMEM; 267 rc = -ENOMEM;
268 goto _error; 268 goto _error;
269 } 269 }
@@ -390,7 +390,7 @@ delete_seq_queue(int queue)
390 qinfo.queue = queue; 390 qinfo.queue = queue;
391 rc = call_ctl(SNDRV_SEQ_IOCTL_DELETE_QUEUE, &qinfo); 391 rc = call_ctl(SNDRV_SEQ_IOCTL_DELETE_QUEUE, &qinfo);
392 if (rc < 0) 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 return rc; 394 return rc;
395} 395}
396 396
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c
index 97f958b46542..3a4569669efa 100644
--- a/sound/core/seq/oss/seq_oss_midi.c
+++ b/sound/core/seq/oss/seq_oss_midi.c
@@ -174,7 +174,7 @@ snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo)
174 * allocate midi info record 174 * allocate midi info record
175 */ 175 */
176 if ((mdev = kzalloc(sizeof(*mdev), GFP_KERNEL)) == NULL) { 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 return -ENOMEM; 178 return -ENOMEM;
179 } 179 }
180 180
@@ -190,7 +190,7 @@ snd_seq_oss_midi_check_new_port(struct snd_seq_port_info *pinfo)
190 190
191 /* create MIDI coder */ 191 /* create MIDI coder */
192 if (snd_midi_event_new(MAX_MIDI_EVENT_BUF, &mdev->coder) < 0) { 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 kfree(mdev); 194 kfree(mdev);
195 return -ENOMEM; 195 return -ENOMEM;
196 } 196 }
diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c
index 73661c4ab82a..654d17a5023c 100644
--- a/sound/core/seq/oss/seq_oss_readq.c
+++ b/sound/core/seq/oss/seq_oss_readq.c
@@ -48,12 +48,12 @@ snd_seq_oss_readq_new(struct seq_oss_devinfo *dp, int maxlen)
48 struct seq_oss_readq *q; 48 struct seq_oss_readq *q;
49 49
50 if ((q = kzalloc(sizeof(*q), GFP_KERNEL)) == NULL) { 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 return NULL; 52 return NULL;
53 } 53 }
54 54
55 if ((q->q = kcalloc(maxlen, sizeof(union evrec), GFP_KERNEL)) == NULL) { 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 kfree(q); 57 kfree(q);
58 return NULL; 58 return NULL;
59 } 59 }
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 7333bfe827a7..701feb71b700 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -106,7 +106,7 @@ snd_seq_oss_synth_register(struct snd_seq_device *dev)
106 unsigned long flags; 106 unsigned long flags;
107 107
108 if ((rec = kzalloc(sizeof(*rec), GFP_KERNEL)) == NULL) { 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 return -ENOMEM; 110 return -ENOMEM;
111 } 111 }
112 rec->seq_device = -1; 112 rec->seq_device = -1;
@@ -130,7 +130,7 @@ snd_seq_oss_synth_register(struct snd_seq_device *dev)
130 if (i >= max_synth_devs) { 130 if (i >= max_synth_devs) {
131 if (max_synth_devs >= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS) { 131 if (max_synth_devs >= SNDRV_SEQ_OSS_MAX_SYNTH_DEVS) {
132 spin_unlock_irqrestore(&register_lock, flags); 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 kfree(rec); 134 kfree(rec);
135 return -ENOMEM; 135 return -ENOMEM;
136 } 136 }
@@ -162,7 +162,7 @@ snd_seq_oss_synth_unregister(struct snd_seq_device *dev)
162 } 162 }
163 if (index >= max_synth_devs) { 163 if (index >= max_synth_devs) {
164 spin_unlock_irqrestore(&register_lock, flags); 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 return -EINVAL; 166 return -EINVAL;
167 } 167 }
168 synth_devs[index] = NULL; 168 synth_devs[index] = NULL;
@@ -247,7 +247,7 @@ snd_seq_oss_synth_setup(struct seq_oss_devinfo *dp)
247 if (info->nr_voices > 0) { 247 if (info->nr_voices > 0) {
248 info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL); 248 info->ch = kcalloc(info->nr_voices, sizeof(struct seq_oss_chinfo), GFP_KERNEL);
249 if (!info->ch) { 249 if (!info->ch) {
250 snd_printk(KERN_ERR "Cannot malloc\n"); 250 pr_err("ALSA: seq_oss: Cannot malloc voices\n");
251 rec->oper.close(&info->arg); 251 rec->oper.close(&info->arg);
252 module_put(rec->oper.owner); 252 module_put(rec->oper.owner);
253 snd_use_lock_free(&rec->use_lock); 253 snd_use_lock_free(&rec->use_lock);