summaryrefslogtreecommitdiffstats
path: root/include/sound/pcm.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-04 18:19:48 +0100
committerTakashi Iwai <tiwai@suse.de>2014-02-14 08:14:15 +0100
commit09e56df8b37f5e751614a0d140b8bf8250812912 (patch)
treeabc4a4b45bc301cf51e996198b2d1b42c8160db9 /include/sound/pcm.h
parentbb00945749c544670d30d9eaee2494da50af6b6e (diff)
downloadop-kernel-dev-09e56df8b37f5e751614a0d140b8bf8250812912.zip
op-kernel-dev-09e56df8b37f5e751614a0d140b8bf8250812912.tar.gz
ALSA: pcm: 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. For simplicity, introduce new helpers for pcm stream, pcm_err(), etc. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/pcm.h')
-rw-r--r--include/sound/pcm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 4883499..b4d6697 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1141,4 +1141,12 @@ static inline u64 pcm_format_to_bits(snd_pcm_format_t pcm_format)
return 1ULL << (__force int) pcm_format;
}
+/* printk helpers */
+#define pcm_err(pcm, fmt, args...) \
+ dev_err((pcm)->card->dev, fmt, ##args)
+#define pcm_warn(pcm, fmt, args...) \
+ dev_warn((pcm)->card->dev, fmt, ##args)
+#define pcm_dbg(pcm, fmt, args...) \
+ dev_dbg((pcm)->card->dev, fmt, ##args)
+
#endif /* __SOUND_PCM_H */
OpenPOWER on IntegriCloud