diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-04 18:19:48 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-14 08:14:15 +0100 |
commit | 09e56df8b37f5e751614a0d140b8bf8250812912 (patch) | |
tree | abc4a4b45bc301cf51e996198b2d1b42c8160db9 /include | |
parent | bb00945749c544670d30d9eaee2494da50af6b6e (diff) | |
download | linux-09e56df8b37f5e751614a0d140b8bf8250812912.tar.bz2 |
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')
-rw-r--r-- | include/sound/pcm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index 4883499ab38b..b4d6697085fe 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 */ |