Commit 61efcee8 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: oss: Use standard printk helpers

Use dev_err() & co as much as possible.  If not available (no device
assigned at the calling point), use pr_xxx() helpers instead.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2ebef69f
......@@ -1187,7 +1187,8 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
if (oss_mixer_names[ch] && strcmp(oss_mixer_names[ch], str) == 0)
break;
if (ch >= SNDRV_OSS_MAX_MIXERS) {
snd_printk(KERN_ERR "mixer_oss: invalid OSS volume '%s'\n", str);
pr_err("ALSA: mixer_oss: invalid OSS volume '%s'\n",
str);
continue;
}
cptr = snd_info_get_str(str, cptr, sizeof(str));
......@@ -1201,7 +1202,7 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
snd_info_get_str(idxstr, cptr, sizeof(idxstr));
idx = simple_strtoul(idxstr, NULL, 10);
if (idx >= 0x4000) { /* too big */
snd_printk(KERN_ERR "mixer_oss: invalid index %d\n", idx);
pr_err("ALSA: mixer_oss: invalid index %d\n", idx);
continue;
}
mutex_lock(&mixer->reg_mutex);
......@@ -1212,7 +1213,7 @@ static void snd_mixer_oss_proc_write(struct snd_info_entry *entry,
goto __unlock;
tbl = kmalloc(sizeof(*tbl), GFP_KERNEL);
if (! tbl) {
snd_printk(KERN_ERR "mixer_oss: no memory\n");
pr_err("ALSA: mixer_oss: no memory\n");
goto __unlock;
}
tbl->oss_id = ch;
......@@ -1352,8 +1353,9 @@ static int snd_mixer_oss_notify_handler(struct snd_card *card, int cmd)
if ((err = snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIXER,
card, 0,
&snd_mixer_oss_f_ops, card)) < 0) {
snd_printk(KERN_ERR "unable to register OSS mixer device %i:%i\n",
card->number, 0);
dev_err(card->dev,
"unable to register OSS mixer device %i:%i\n",
card->number, 0);
kfree(mixer);
return err;
}
......
This diff is collapsed.
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