From 1120e8745ccd3e512fe2016c9e5092fcd378490a Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 2 Mar 2016 19:37:30 +0100 Subject: Restructure driver headers --- driver/debug.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 driver/debug.h (limited to 'driver/debug.h') 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 */ -- cgit v1.2.3