hwmon: (tmp401) convert to use maple tree register cache
authorBo Liu <liubo03@inspur.com>
Fri, 2 Feb 2024 07:22:35 +0000 (02:22 -0500)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 25 Feb 2024 20:37:36 +0000 (12:37 -0800)
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/20240202072235.41614-1-liubo03@inspur.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/tmp401.c

index 91f2314568cfaf6342552f57c24d6a9647aff727..df1b45a62e804e8ed6d6e1dda32ffa8924327898 100644 (file)
@@ -256,7 +256,7 @@ static int tmp401_reg_write(void *context, unsigned int reg, unsigned int val)
 static const struct regmap_config tmp401_regmap_config = {
        .reg_bits = 8,
        .val_bits = 16,
-       .cache_type = REGCACHE_RBTREE,
+       .cache_type = REGCACHE_MAPLE,
        .volatile_reg = tmp401_regmap_is_volatile,
        .reg_read = tmp401_reg_read,
        .reg_write = tmp401_reg_write,