regmap: make LZO cache optional

Commit 2cbbb579bc ("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>
This commit is contained in:
Jonas Gorski
2017-06-02 15:15:37 +02:00
committed by Mark Brown
parent 2ea659a9ef
commit 34a730aa74
3 changed files with 8 additions and 2 deletions

View File

@@ -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,
};