summaryrefslogtreecommitdiffstats
path: root/driver/debug.h
diff options
context:
space:
mode:
authorVasilii Chernov <vchernov@inr.ru>2016-03-03 10:34:49 +0100
committerVasilii Chernov <vchernov@inr.ru>2016-03-03 10:34:49 +0100
commitee16e47966afe180d3c32e2b1d93301052894fac (patch)
tree56aecf261aaae57e28c08cef573ae6642ec5394d /driver/debug.h
parent02d0026e2df2ba5c68c0c1a67aec4437c9e8e8f3 (diff)
parent195c28f3074486165b6e0935362810f8a1fb9531 (diff)
downloadpcitool-ee16e47966afe180d3c32e2b1d93301052894fac.tar.gz
pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.tar.bz2
pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.tar.xz
pcitool-ee16e47966afe180d3c32e2b1d93301052894fac.zip
Merge with http://ufo.kit.edu/ufo/log/csa/pcitool 369 revision
Diffstat (limited to 'driver/debug.h')
-rw-r--r--driver/debug.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/driver/debug.h b/driver/debug.h
new file mode 100644
index 0000000..b30e81d
--- /dev/null
+++ b/driver/debug.h
@@ -0,0 +1,25 @@
+#ifndef _PCIDRIVER_DEBUG_H
+#define _PCIDRIVER_DEBUG_H
+
+#include "config.h"
+
+#ifdef DEBUG
+#define mod_info( args... ) \
+ do { printk( KERN_INFO "%s - %s : ", MODNAME , __FUNCTION__ );\
+ printk( args ); } while(0)
+#define mod_info_dbg( args... ) \
+ do { printk( KERN_INFO "%s - %s : ", MODNAME , __FUNCTION__ );\
+ printk( args ); } while(0)
+#else
+#define mod_info( args... ) \
+ do { printk( KERN_INFO "%s: ", MODNAME );\
+ printk( args ); } while(0)
+#define mod_info_dbg( args... )
+#endif
+
+#define mod_crit( args... ) \
+ do { printk( KERN_CRIT "%s: ", MODNAME );\
+ printk( args ); } while(0)
+
+
+#endif /* _PCIDRIVER_DEBUG_H */