summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regcache.c
diff options
context:
space:
mode:
authorJonas Gorski <jonas.gorski@gmail.com>2017-06-02 16:15:37 +0300
committerMark Brown <broonie@kernel.org>2017-06-06 21:46:57 +0300
commit34a730aa74c7c743f4ca9635e0d0b2479d6ed53c (patch)
treec1f027c89c567e4c8a50ed48a6c3a3fd841f361a /drivers/base/regmap/regcache.c
parent2ea659a9ef488125eb46da6eb571de5eae5c43f6 (diff)
downloadlinux-34a730aa74c7c743f4ca9635e0d0b2479d6ed53c.tar.xz
regmap: make LZO cache optional
Commit 2cbbb579bcbe3 ("regmap: Add the LZO cache support") added support for LZO compression in regcache, but there were never any users added afterwards. Since LZO support itself has its own size, it currently is rather a deoptimization. So make it optional by introducing a symbol that can be selected by drivers wanting to make use of it. Saves e.g. ~46 kB on MIPS (size of LZO support + regcache LZO code). Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r--drivers/base/regmap/regcache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index b0a0dcf32fb7..f3a435ee5fe8 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -21,7 +21,9 @@
static const struct regcache_ops *cache_types[] = {
&regcache_rbtree_ops,
+#if IS_ENABLED(CONFIG_REGCHACHE_COMPRESSED)
&regcache_lzo_ops,
+#endif
&regcache_flat_ops,
};