Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

hwmon: (adt7x10) convert to use maple tree register cache

The maple tree register cache is based on a much more modern data structure
than the rbtree cache and makes optimisation choices which are probably
more appropriate for modern systems than those made by the rbtree cache.

Signed-off-by: Bo Liu <liubo03@inspur.com>
Link: https://lore.kernel.org/r/20240202071355.40666-1-liubo03@inspur.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>

authored by

Bo Liu and committed by
Guenter Roeck
f5b75bde 9d613d9b

+2 -2
+1 -1
drivers/hwmon/adt7310.c
··· 124 124 static const struct regmap_config adt7310_regmap_config = { 125 125 .reg_bits = 8, 126 126 .val_bits = 16, 127 - .cache_type = REGCACHE_RBTREE, 127 + .cache_type = REGCACHE_MAPLE, 128 128 .volatile_reg = adt7310_regmap_is_volatile, 129 129 .reg_read = adt7310_reg_read, 130 130 .reg_write = adt7310_reg_write,
+1 -1
drivers/hwmon/adt7410.c
··· 69 69 .reg_bits = 8, 70 70 .val_bits = 16, 71 71 .max_register = ADT7X10_ID, 72 - .cache_type = REGCACHE_RBTREE, 72 + .cache_type = REGCACHE_MAPLE, 73 73 .volatile_reg = adt7410_regmap_is_volatile, 74 74 .reg_read = adt7410_reg_read, 75 75 .reg_write = adt7410_reg_write,