]> Pileus Git - ~andy/linux/commitdiff
staging: comedi: remove comedi_debug module parameter
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 22 Nov 2013 17:45:38 +0000 (10:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Nov 2013 19:50:53 +0000 (11:50 -0800)
Remove this module parameter and use the CONFIG_COMEDI_DEBUG option to
enable normal kernel debugging with -DDEBUG flag.

Remove the #undef DEBUG from all the comedi source files so they will
honour the -DDEBUG flag.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/Makefile
drivers/staging/comedi/comedi_fops.c
drivers/staging/comedi/comedidev.h
drivers/staging/comedi/drivers/Makefile
drivers/staging/comedi/drivers/ni_mio_cs.c
drivers/staging/comedi/kcomedilib/Makefile

index e6dfc98f8c8ed8513740cea86ff7eda140ffca92..fae2d9090006848d4f89913ee62a2ea58e19f3ca 100644 (file)
@@ -1,3 +1,5 @@
+ccflags-$(CONFIG_COMEDI_DEBUG)         := -DDEBUG
+
 comedi-y                               := comedi_fops.o range.o drivers.o \
                                           comedi_buf.o
 comedi-$(CONFIG_COMEDI_PCI_DRIVERS)    += comedi_pci.o
index 58f2b27144ca5dfd9a37bcff6d85b0ca1e12637c..1071c9601d1aa969e479152b47f681172e68b5e9 100644 (file)
@@ -16,8 +16,6 @@
     GNU General Public License for more details.
 */
 
-#undef DEBUG
-
 #include "comedi_compat32.h"
 
 #include <linux/module.h>
 #define COMEDI_NUM_SUBDEVICE_MINORS    \
        (COMEDI_NUM_MINORS - COMEDI_NUM_BOARD_MINORS)
 
-#ifdef CONFIG_COMEDI_DEBUG
-int comedi_debug;
-EXPORT_SYMBOL_GPL(comedi_debug);
-module_param(comedi_debug, int, S_IRUGO | S_IWUSR);
-MODULE_PARM_DESC(comedi_debug,
-                "enable comedi core and driver debugging if non-zero (default 0)"
-               );
-#endif
-
 static int comedi_num_legacy_minors;
 module_param(comedi_num_legacy_minors, int, S_IRUGO);
 MODULE_PARM_DESC(comedi_num_legacy_minors,
index a7b8937aa4a390ee073abde6177538a72b2c7f1b..3c6329bed5084966a7269e13ce7fa11d72152c55 100644 (file)
 
 #include "comedi.h"
 
-#define DPRINTK(format, args...)       do {            \
-       if (comedi_debug)                               \
-               pr_debug("comedi: " format, ## args);   \
-} while (0)
+#define DPRINTK(format, args...)       pr_debug("comedi: " format, ## args);
 
 #define COMEDI_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
 #define COMEDI_VERSION_CODE COMEDI_VERSION(COMEDI_MAJORVERSION, \
@@ -216,12 +213,6 @@ static inline const void *comedi_board(const struct comedi_device *dev)
        return dev->board_ptr;
 }
 
-#ifdef CONFIG_COMEDI_DEBUG
-extern int comedi_debug;
-#else
-static const int comedi_debug;
-#endif
-
 /*
  * function prototypes
  */
index 94cbd2618fc8b875fad6d43edbe8ef2d4821590f..a16e674e2a2bb45a4d47e60ecb33bc1f33ec9765 100644 (file)
@@ -1,5 +1,6 @@
 # Makefile for individual comedi drivers
 #
+ccflags-$(CONFIG_COMEDI_DEBUG)         := -DDEBUG
 
 # Comedi "helper" modules
 
index 229a273f2016831ef43033d9fb89d8517e86ba4c..de421486b7585b3e562190fd501b824d8f877fe3 100644 (file)
@@ -47,8 +47,6 @@ See the notes in the ni_atmio.o driver.
 #include <pcmcia/cistpl.h>
 #include <pcmcia/ds.h>
 
-#undef DEBUG
-
 #define ATMIO 1
 #undef PCIMIO
 
index 18ee99bdde0841da3279e04bff9ddbafd6d2826a..3aff8ed08e2dec1114c9e503a0c32e477422ab0c 100644 (file)
@@ -1,3 +1,5 @@
+ccflags-$(CONFIG_COMEDI_DEBUG)         := -DDEBUG
+
 obj-$(CONFIG_COMEDI_KCOMEDILIB)        += kcomedilib.o
 
 kcomedilib-objs := kcomedilib_main.o