Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f51a07d0 authored by Joe Perches's avatar Joe Perches Committed by Tomi Valkeinen
Browse files

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: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 55aa42f2
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -792,4 +792,16 @@ extern int fb_find_mode(struct fb_var_screeninfo *var,
			const struct fb_videomode *default_mode,
			unsigned int default_bpp);

/* Convenience logging macros */
#define fb_err(fb_info, fmt, ...)					\
	pr_err("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
#define fb_notice(info, fmt, ...)					\
	pr_notice("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
#define fb_warn(fb_info, fmt, ...)					\
	pr_warn("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
#define fb_info(fb_info, fmt, ...)					\
	pr_info("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)
#define fb_dbg(fb_info, fmt, ...)					\
	pr_debug("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)

#endif /* _LINUX_FB_H */