From f7e4720b31bce6102fb438139db8976ae8d411bf Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 25 Jul 2002 19:37:18 +0000 Subject: [PATCH] Add comedi_debug symbol and make DPRINTK() conditional on it. --- include/linux/comedidev.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 */ -- 2.26.2