diff options
author | Joe Perches <joe@perches.com> | 2013-09-19 21:35:54 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-10-29 06:53:04 -0400 |
commit | f51a07d05c5142e73f781d878f411d63d3548a49 (patch) | |
tree | 3487faa6a743672905c81e3b9829e2476dbc741b /include/linux/fb.h | |
parent | 55aa42f2e690157e254a6a6989f5f4ac928b35c8 (diff) |
framebuffer: Add fb_<level> convenience logging macros
Add fb_<level> convenience macros for emitting the
"fb%d: ", struct fb_info->node value.
Neatens and shortens the code a bit.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'include/linux/fb.h')
-rw-r--r-- | include/linux/fb.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/fb.h b/include/linux/fb.h index ffac70aab3e9..70c4836e4a9f 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -792,4 +792,16 @@ extern int fb_find_mode(struct fb_var_screeninfo *var, | |||
792 | const struct fb_videomode *default_mode, | 792 | const struct fb_videomode *default_mode, |
793 | unsigned int default_bpp); | 793 | unsigned int default_bpp); |
794 | 794 | ||
795 | /* Convenience logging macros */ | ||
796 | #define fb_err(fb_info, fmt, ...) \ | ||
797 | pr_err("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) | ||
798 | #define fb_notice(info, fmt, ...) \ | ||
799 | pr_notice("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) | ||
800 | #define fb_warn(fb_info, fmt, ...) \ | ||
801 | pr_warn("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) | ||
802 | #define fb_info(fb_info, fmt, ...) \ | ||
803 | pr_info("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) | ||
804 | #define fb_dbg(fb_info, fmt, ...) \ | ||
805 | pr_debug("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__) | ||
806 | |||
795 | #endif /* _LINUX_FB_H */ | 807 | #endif /* _LINUX_FB_H */ |