From: Xiao Guangrong Date: Tue, 26 Jun 2012 08:50:31 +0000 (+0800) Subject: staging: zcache: remove unnecessary config option dependence X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~14375^2~374 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f64d94f9f7536842a120f6eef4cfd4cfcd516f5e;p=mirror_ubuntu-artful-kernel.git staging: zcache: remove unnecessary config option dependence zcache is enabled only if one of CONFIG_CLEANCACHE and CONFIG_FRONTSWAP is enabled, see the Kconfig: depends on (CLEANCACHE || FRONTSWAP) && CRYPTO=y && X86 So, we can remove the check in the source code Acked-by: Seth Jennings Signed-off-by: Xiao Guangrong Acked-by: Konrad Rzeszutek Wilk Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index 58e7bd432508..36c3b05926e3 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c @@ -36,9 +36,6 @@ #include "../zsmalloc/zsmalloc.h" -#if (!defined(CONFIG_CLEANCACHE) && !defined(CONFIG_FRONTSWAP)) -#error "zcache is useless without CONFIG_CLEANCACHE or CONFIG_FRONTSWAP" -#endif #ifdef CONFIG_CLEANCACHE #include #endif @@ -2028,7 +2025,7 @@ static int __init zcache_init(void) goto out; } #endif /* CONFIG_SYSFS */ -#if defined(CONFIG_CLEANCACHE) || defined(CONFIG_FRONTSWAP) + if (zcache_enabled) { unsigned int cpu; @@ -2059,7 +2056,7 @@ static int __init zcache_init(void) pr_err("zcache: can't create client\n"); goto out; } -#endif + #ifdef CONFIG_CLEANCACHE if (zcache_enabled && use_cleancache) { struct cleancache_ops old_ops;