regmap: Remove indexed cache type
Subsystems (2)
PATCH 1/1 regmap: Remove indexed cache type
There should be no situation where it offers any advantage over rbtree and there are no current users so remove the code for simplicity.
Signed-off-by Mark Brown <[email protected]>
--- drivers/base/regmap/Makefile | 2 +- drivers/base/regmap/internal.h | 3 - drivers/base/regmap/regcache-indexed.c | 64 -------------------------------- drivers/base/regmap/regcache.c | 20 ---------- include/linux/regmap.h | 1 - 5 files changed, 1 insertions(+), 89 deletions(-) delete mode 100644 drivers/base/regmap/regcache-indexed.c
drivers/base/regmap/Makefile +1 -1
@@ -1,4 +1,4 @@ -obj-$(CONFIG_REGMAP) += regmap.o regcache.o regcache-indexed.o +obj-$(CONFIG_REGMAP) += regmap.o regcache.o obj-$(CONFIG_REGMAP) += regcache-rbtree.o regcache-lzo.o obj-$(CONFIG_DEBUG_FS) += regmap-debugfs.o obj-$(CONFIG_REGMAP_I2C) += regmap-i2c.o
drivers/base/regmap/internal.h +0 -3
@@ -119,10 +119,7 @@ unsigned int regcache_get_val(const void *base, unsigned int idx,bool regcache_set_val (void *base,unsigned int idx,unsigned int val,unsigned int word_size);int regcache_lookup_reg (struct regmap *map,unsigned int reg); -int regcache_insert_reg (struct regmap *map,unsigned int reg, -unsigned int val); -extern struct regcache_ops regcache_indexed_ops;extern struct regcache_ops regcache_rbtree_ops;extern struct regcache_ops regcache_lzo_ops;
drivers/base/regmap/regcache-indexed.c deleted +0 -64
64 lines not on this page · raw message
drivers/base/regmap/regcache.c +0 -20
@@ -19,7 +19,6 @@#include "internal.h" static const struct regcache_ops *cache_types[] = { - ®cache_indexed_ops, ®cache_rbtree_ops, ®cache_lzo_ops, };
@@ -420,22 +419,3 @@ int regcache_lookup_reg(struct regmap *map, unsigned int reg)else return -ENOENT ; } - -int regcache_insert_reg (struct regmap *map,unsigned int reg, -unsigned int val) -{ -void *tmp; - - tmp =krealloc (map->reg_defaults, - (map->num_reg_defaults +1 ) *sizeof (struct reg_default ), -GFP_KERNEL ); -if (!tmp) -return -ENOMEM ; - map->reg_defaults = tmp; - map->num_reg_defaults++; - map->reg_defaults[map->num_reg_defaults -1 ].reg = reg; - map->reg_defaults[map->num_reg_defaults -1 ].def = val; -sort (map->reg_defaults, map->num_reg_defaults, -sizeof (struct reg_default ), regcache_default_cmp,NULL ); -return 0 ; -}
include/linux/regmap.h +0 -1
@@ -23,7 +23,6 @@ struct spi_device;/* An enum of all the supported cache types */ enum regcache_type {REGCACHE_NONE , -REGCACHE_INDEXED ,REGCACHE_RBTREE ,REGCACHE_COMPRESSED };
Signature · 1 line
1.7.7.3