Commit cf74dcf3 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: timer: Use standard printk helpers

Use the standard pr_xxx() helpers instead of home-baked snd_print*().
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 61efcee8
...@@ -126,8 +126,7 @@ static int __init snd_hrtimer_init(void) ...@@ -126,8 +126,7 @@ static int __init snd_hrtimer_init(void)
hrtimer_get_res(CLOCK_MONOTONIC, &tp); hrtimer_get_res(CLOCK_MONOTONIC, &tp);
if (tp.tv_sec > 0 || !tp.tv_nsec) { if (tp.tv_sec > 0 || !tp.tv_nsec) {
snd_printk(KERN_ERR pr_err("snd-hrtimer: Invalid resolution %u.%09u",
"snd-hrtimer: Invalid resolution %u.%09u",
(unsigned)tp.tv_sec, (unsigned)tp.tv_nsec); (unsigned)tp.tv_sec, (unsigned)tp.tv_nsec);
return -EINVAL; return -EINVAL;
} }
......
...@@ -132,8 +132,7 @@ static int __init rtctimer_init(void) ...@@ -132,8 +132,7 @@ static int __init rtctimer_init(void)
if (rtctimer_freq < 2 || rtctimer_freq > 8192 || if (rtctimer_freq < 2 || rtctimer_freq > 8192 ||
!is_power_of_2(rtctimer_freq)) { !is_power_of_2(rtctimer_freq)) {
snd_printk(KERN_ERR "rtctimer: invalid frequency %d\n", pr_err("ALSA: rtctimer: invalid frequency %d\n", rtctimer_freq);
rtctimer_freq);
return -EINVAL; return -EINVAL;
} }
......
...@@ -240,7 +240,8 @@ int snd_timer_open(struct snd_timer_instance **ti, ...@@ -240,7 +240,8 @@ int snd_timer_open(struct snd_timer_instance **ti,
/* open a slave instance */ /* open a slave instance */
if (tid->dev_sclass <= SNDRV_TIMER_SCLASS_NONE || if (tid->dev_sclass <= SNDRV_TIMER_SCLASS_NONE ||
tid->dev_sclass > SNDRV_TIMER_SCLASS_OSS_SEQUENCER) { tid->dev_sclass > SNDRV_TIMER_SCLASS_OSS_SEQUENCER) {
snd_printd("invalid slave class %i\n", tid->dev_sclass); pr_debug("ALSA: timer: invalid slave class %i\n",
tid->dev_sclass);
return -EINVAL; return -EINVAL;
} }
mutex_lock(&register_mutex); mutex_lock(&register_mutex);
...@@ -774,7 +775,7 @@ int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid, ...@@ -774,7 +775,7 @@ int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid,
*rtimer = NULL; *rtimer = NULL;
timer = kzalloc(sizeof(*timer), GFP_KERNEL); timer = kzalloc(sizeof(*timer), GFP_KERNEL);
if (timer == NULL) { if (timer == NULL) {
snd_printk(KERN_ERR "timer: cannot allocate\n"); pr_err("ALSA: timer: cannot allocate\n");
return -ENOMEM; return -ENOMEM;
} }
timer->tmr_class = tid->dev_class; timer->tmr_class = tid->dev_class;
...@@ -813,7 +814,7 @@ static int snd_timer_free(struct snd_timer *timer) ...@@ -813,7 +814,7 @@ static int snd_timer_free(struct snd_timer *timer)
if (! list_empty(&timer->open_list_head)) { if (! list_empty(&timer->open_list_head)) {
struct list_head *p, *n; struct list_head *p, *n;
struct snd_timer_instance *ti; struct snd_timer_instance *ti;
snd_printk(KERN_WARNING "timer %p is busy?\n", timer); pr_warn("ALSA: timer %p is busy?\n", timer);
list_for_each_safe(p, n, &timer->open_list_head) { list_for_each_safe(p, n, &timer->open_list_head) {
list_del_init(p); list_del_init(p);
ti = list_entry(p, struct snd_timer_instance, open_list); ti = list_entry(p, struct snd_timer_instance, open_list);
...@@ -1955,12 +1956,10 @@ static int __init alsa_timer_init(void) ...@@ -1955,12 +1956,10 @@ static int __init alsa_timer_init(void)
#endif #endif
if ((err = snd_timer_register_system()) < 0) if ((err = snd_timer_register_system()) < 0)
snd_printk(KERN_ERR "unable to register system timer (%i)\n", pr_err("ALSA: unable to register system timer (%i)\n", err);
err);
if ((err = snd_register_device(SNDRV_DEVICE_TYPE_TIMER, NULL, 0, if ((err = snd_register_device(SNDRV_DEVICE_TYPE_TIMER, NULL, 0,
&snd_timer_f_ops, NULL, "timer")) < 0) &snd_timer_f_ops, NULL, "timer")) < 0)
snd_printk(KERN_ERR "unable to register timer device (%i)\n", pr_err("ALSA: unable to register timer device (%i)\n", err);
err);
snd_timer_proc_init(); snd_timer_proc_init();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment