summaryrefslogtreecommitdiffstats
path: root/sound/core/info.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-04 18:21:03 +0100
committerTakashi Iwai <tiwai@suse.de>2014-02-14 08:14:15 +0100
commitf2f9307a4f26a9fbe47fff486a9cee5885af748f (patch)
tree52e3cf57d91763c7f284e654c9d10a4152214656 /sound/core/info.c
parent09e56df8b37f5e751614a0d140b8bf8250812912 (diff)
downloadlinux-f2f9307a4f26a9fbe47fff486a9cee5885af748f.tar.bz2
ALSA: core: 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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/info.c')
-rw-r--r--sound/core/info.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index 7916c07b9324..051d55b05521 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -418,9 +418,14 @@ static int snd_info_entry_release(struct inode *inode, struct file *file)
if (entry->c.text.write) {
entry->c.text.write(entry, data->wbuffer);
if (data->wbuffer->error) {
- snd_printk(KERN_WARNING "data write error to %s (%i)\n",
- entry->name,
- data->wbuffer->error);
+ if (entry->card)
+ dev_warn(entry->card->dev, "info: data write error to %s (%i)\n",
+ entry->name,
+ data->wbuffer->error);
+ else
+ pr_warn("ALSA: info: data write error to %s (%i)\n",
+ entry->name,
+ data->wbuffer->error);
}
}
kfree(data->wbuffer->buffer);