zram/xvmalloc: create CONFIG_ZRAM_DEBUG for debug code
authorRobert Jennings <rcj@linux.vnet.ibm.com>
Fri, 28 Jan 2011 14:59:26 +0000 (08:59 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Feb 2011 21:29:11 +0000 (13:29 -0800)
Add a debug config flag to enable debug printk output and future
debug code.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/zram/Kconfig
drivers/staging/zram/xvmalloc.c
drivers/staging/zram/zram_drv.c

index d3982e6fdb40fdb6e5aa24cd72f258678ee9e324..2f3b484ce5a453f2324230981a5b825ec7546f79 100644 (file)
@@ -15,3 +15,11 @@ config ZRAM
 
          See zram.txt for more information.
          Project home: http://compcache.googlecode.com/
+
+config ZRAM_DEBUG
+       bool "Compressed RAM block device debug support"
+       depends on ZRAM
+       default n
+       help
+         This option adds additional debugging code to the compressed
+         RAM block device driver.
index 9cbe04a496e1b88a895bf632a595fd34ee83b5e6..4f6cb8de6865b21967e1ceea6c185e6530e3ca33 100644 (file)
  * Released under the terms of GNU General Public License Version 2.0
  */
 
+#ifdef CONFIG_ZRAM_DEBUG
+#define DEBUG
+#endif
+
 #include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/highmem.h>
index 3c8ecab70e97b6ae6322808f0cd63a8dd7454751..7d11c595c7d24a8014fc14dc64d1b6d06cb0c057 100644 (file)
 #define KMSG_COMPONENT "zram"
 #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
 
+#ifdef CONFIG_ZRAM_DEBUG
+#define DEBUG
+#endif
+
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/bio.h>