xref: /openbmc/linux/drivers/video/fbdev/via/debug.h (revision 6ce2fc42)
164b70da0SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */
2f7018c21STomi Valkeinen /*
3f7018c21STomi Valkeinen  * Copyright 1998-2008 VIA Technologies, Inc. All Rights Reserved.
4f7018c21STomi Valkeinen  * Copyright 2001-2008 S3 Graphics, Inc. All Rights Reserved.
5f7018c21STomi Valkeinen 
6f7018c21STomi Valkeinen  */
7f7018c21STomi Valkeinen #ifndef __DEBUG_H__
8f7018c21STomi Valkeinen #define __DEBUG_H__
9f7018c21STomi Valkeinen 
106ce2fc42SRandy Dunlap #include <linux/printk.h>
116ce2fc42SRandy Dunlap 
12f7018c21STomi Valkeinen #ifndef VIAFB_DEBUG
13f7018c21STomi Valkeinen #define VIAFB_DEBUG 0
14f7018c21STomi Valkeinen #endif
15f7018c21STomi Valkeinen 
16f7018c21STomi Valkeinen #if VIAFB_DEBUG
17f7018c21STomi Valkeinen #define DEBUG_MSG(f, a...)   printk(f, ## a)
18f7018c21STomi Valkeinen #else
196ce2fc42SRandy Dunlap #define DEBUG_MSG(f, a...)   no_printk(f, ## a)
20f7018c21STomi Valkeinen #endif
21f7018c21STomi Valkeinen 
22f7018c21STomi Valkeinen #define VIAFB_WARN 0
23f7018c21STomi Valkeinen #if VIAFB_WARN
24f7018c21STomi Valkeinen #define WARN_MSG(f, a...)   printk(f, ## a)
25f7018c21STomi Valkeinen #else
266ce2fc42SRandy Dunlap #define WARN_MSG(f, a...)   no_printk(f, ## a)
27f7018c21STomi Valkeinen #endif
28f7018c21STomi Valkeinen 
29f7018c21STomi Valkeinen #endif /* __DEBUG_H__ */
30