diff options
author | Robert Jennings <rcj@linux.vnet.ibm.com> | 2011-01-28 08:59:26 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-04 13:29:11 -0800 |
commit | b1f5b81ebeee3974a8c793cafacace991d9a864d (patch) | |
tree | 90f18ed06d18aec6bb0794a449392ae6ff6def93 | |
parent | e3f201b541ff6748db77b857d2ae69fc9dbbee11 (diff) | |
download | linux-3.10-b1f5b81ebeee3974a8c793cafacace991d9a864d.tar.gz linux-3.10-b1f5b81ebeee3974a8c793cafacace991d9a864d.tar.bz2 linux-3.10-b1f5b81ebeee3974a8c793cafacace991d9a864d.zip |
zram/xvmalloc: create CONFIG_ZRAM_DEBUG for debug code
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>
-rw-r--r-- | drivers/staging/zram/Kconfig | 8 | ||||
-rw-r--r-- | drivers/staging/zram/xvmalloc.c | 4 | ||||
-rw-r--r-- | drivers/staging/zram/zram_drv.c | 4 |
3 files changed, 16 insertions, 0 deletions
diff --git a/drivers/staging/zram/Kconfig b/drivers/staging/zram/Kconfig index d3982e6fdb4..2f3b484ce5a 100644 --- a/drivers/staging/zram/Kconfig +++ b/drivers/staging/zram/Kconfig @@ -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. diff --git a/drivers/staging/zram/xvmalloc.c b/drivers/staging/zram/xvmalloc.c index 9cbe04a496e..4f6cb8de686 100644 --- a/drivers/staging/zram/xvmalloc.c +++ b/drivers/staging/zram/xvmalloc.c @@ -10,6 +10,10 @@ * 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> diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 3c8ecab70e9..7d11c595c7d 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c @@ -15,6 +15,10 @@ #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> |