Skip to content

Commit cf74dcf

Browse files
committed
ALSA: timer: Use standard printk helpers
Use the standard pr_xxx() helpers instead of home-baked snd_print*(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 61efcee commit cf74dcf

3 files changed

Lines changed: 8 additions & 11 deletions

File tree

‎sound/core/hrtimer.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ static int __init snd_hrtimer_init(void)
126126

127127
hrtimer_get_res(CLOCK_MONOTONIC, &tp);
128128
if (tp.tv_sec > 0 || !tp.tv_nsec) {
129-
snd_printk(KERN_ERR
130-
"snd-hrtimer: Invalid resolution %u.%09u",
129+
pr_err("snd-hrtimer: Invalid resolution %u.%09u",
131130
(unsigned)tp.tv_sec, (unsigned)tp.tv_nsec);
132131
return -EINVAL;
133132
}

‎sound/core/rtctimer.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,7 @@ static int __init rtctimer_init(void)
132132

133133
if (rtctimer_freq < 2 || rtctimer_freq > 8192 ||
134134
!is_power_of_2(rtctimer_freq)) {
135-
snd_printk(KERN_ERR "rtctimer: invalid frequency %d\n",
136-
rtctimer_freq);
135+
pr_err("ALSA: rtctimer: invalid frequency %d\n", rtctimer_freq);
137136
return -EINVAL;
138137
}
139138

‎sound/core/timer.c‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ int snd_timer_open(struct snd_timer_instance **ti,
240240
/* open a slave instance */
241241
if (tid->dev_sclass <= SNDRV_TIMER_SCLASS_NONE ||
242242
tid->dev_sclass > SNDRV_TIMER_SCLASS_OSS_SEQUENCER) {
243-
snd_printd("invalid slave class %i\n", tid->dev_sclass);
243+
pr_debug("ALSA: timer: invalid slave class %i\n",
244+
tid->dev_sclass);
244245
return -EINVAL;
245246
}
246247
mutex_lock(&register_mutex);
@@ -774,7 +775,7 @@ int snd_timer_new(struct snd_card *card, char *id, struct snd_timer_id *tid,
774775
*rtimer = NULL;
775776
timer = kzalloc(sizeof(*timer), GFP_KERNEL);
776777
if (timer == NULL) {
777-
snd_printk(KERN_ERR "timer: cannot allocate\n");
778+
pr_err("ALSA: timer: cannot allocate\n");
778779
return -ENOMEM;
779780
}
780781
timer->tmr_class = tid->dev_class;
@@ -813,7 +814,7 @@ static int snd_timer_free(struct snd_timer *timer)
813814
if (! list_empty(&timer->open_list_head)) {
814815
struct list_head *p, *n;
815816
struct snd_timer_instance *ti;
816-
snd_printk(KERN_WARNING "timer %p is busy?\n", timer);
817+
pr_warn("ALSA: timer %p is busy?\n", timer);
817818
list_for_each_safe(p, n, &timer->open_list_head) {
818819
list_del_init(p);
819820
ti = list_entry(p, struct snd_timer_instance, open_list);
@@ -1955,12 +1956,10 @@ static int __init alsa_timer_init(void)
19551956
#endif
19561957

19571958
if ((err = snd_timer_register_system()) < 0)
1958-
snd_printk(KERN_ERR "unable to register system timer (%i)\n",
1959-
err);
1959+
pr_err("ALSA: unable to register system timer (%i)\n", err);
19601960
if ((err = snd_register_device(SNDRV_DEVICE_TYPE_TIMER, NULL, 0,
19611961
&snd_timer_f_ops, NULL, "timer")) < 0)
1962-
snd_printk(KERN_ERR "unable to register timer device (%i)\n",
1963-
err);
1962+
pr_err("ALSA: unable to register timer device (%i)\n", err);
19641963
snd_timer_proc_init();
19651964
return 0;
19661965
}

0 commit comments

Comments
 (0)