From: David Schleef Date: Thu, 25 Jul 2002 19:37:18 +0000 (+0000) Subject: Add comedi_debug symbol and make DPRINTK() conditional on it. X-Git-Tag: r0_7_66~135 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f7e4720b31bce6102fb438139db8976ae8d411bf;p=comedi.git Add comedi_debug symbol and make DPRINTK() conditional on it. --- diff --git a/include/linux/comedidev.h b/include/linux/comedidev.h index b8472910..98c56a7f 100644 --- a/include/linux/comedidev.h +++ b/include/linux/comedidev.h @@ -38,11 +38,9 @@ #include -#ifdef CONFIG_COMEDI_DEBUG -#define DPRINTK(format, args...) printk("comedi: " format , ## args ) -#else -#define DPRINTK(format, args...) /* */ -#endif +#define DPRINTK(format, args...) do{ \ + if(comedi_debug)printk("comedi: " format , ## args ); \ +} while(0) #ifndef COMEDI_VERSION_CODE #define COMEDI_VERSION_CODE 0x10000 @@ -209,6 +207,12 @@ struct comedi_device_struct{ extern comedi_device *comedi_devices; extern spinlock_t big_comedi_lock; +#ifdef CONFIG_COMEDI_DEBUG +extern int comedi_debug; +#else +const int comedi_debug = 0; +#endif + /* * function prototypes */