diff options
author | Robert Jennings <rcj@linux.vnet.ibm.com> | 2011-01-28 09:59:26 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-04 16:29:11 -0500 |
commit | b1f5b81ebeee3974a8c793cafacace991d9a864d (patch) | |
tree | 90f18ed06d18aec6bb0794a449392ae6ff6def93 /drivers/staging | |
parent | e3f201b541ff6748db77b857d2ae69fc9dbbee11 (diff) |
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>
Diffstat (limited to 'drivers/staging')
-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 | |||
15 | 15 | ||
16 | See zram.txt for more information. | 16 | See zram.txt for more information. |
17 | Project home: http://compcache.googlecode.com/ | 17 | Project home: http://compcache.googlecode.com/ |
18 | |||
19 | config ZRAM_DEBUG | ||
20 | bool "Compressed RAM block device debug support" | ||
21 | depends on ZRAM | ||
22 | default n | ||
23 | help | ||
24 | This option adds additional debugging code to the compressed | ||
25 | 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 @@ | |||
10 | * Released under the terms of GNU General Public License Version 2.0 | 10 | * Released under the terms of GNU General Public License Version 2.0 |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifdef CONFIG_ZRAM_DEBUG | ||
14 | #define DEBUG | ||
15 | #endif | ||
16 | |||
13 | #include <linux/bitops.h> | 17 | #include <linux/bitops.h> |
14 | #include <linux/errno.h> | 18 | #include <linux/errno.h> |
15 | #include <linux/highmem.h> | 19 | #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 @@ | |||
15 | #define KMSG_COMPONENT "zram" | 15 | #define KMSG_COMPONENT "zram" |
16 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | 16 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt |
17 | 17 | ||
18 | #ifdef CONFIG_ZRAM_DEBUG | ||
19 | #define DEBUG | ||
20 | #endif | ||
21 | |||
18 | #include <linux/module.h> | 22 | #include <linux/module.h> |
19 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
20 | #include <linux/bio.h> | 24 | #include <linux/bio.h> |