summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwangkaiyuan <wangkaiyuan@inspur.com>2024-03-18 14:40:36 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-09 16:50:36 +0200
commitc9615d34ce26199054e188f634eac2e45c9cc906 (patch)
treedf55393fac7a8cc58f1df8c3c9a6f21237733c8d
parent0867a9805549632969fbb996c50ba8adb1bc38bf (diff)
downloadlinux-stable-c9615d34ce26199054e188f634eac2e45c9cc906.tar.gz
linux-stable-c9615d34ce26199054e188f634eac2e45c9cc906.tar.bz2
linux-stable-c9615d34ce26199054e188f634eac2e45c9cc906.zip
tty: serial: max310x: 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: wangkaiyuan <wangkaiyuan@inspur.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20240318064036.1656-1-wangkaiyuan@inspur.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/max310x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index f0eb96429dae..35369a2f77b2 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1473,7 +1473,7 @@ static struct regmap_config regcfg = {
.reg_bits = 8,
.val_bits = 8,
.write_flag_mask = MAX310X_WRITE_BIT,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
.max_register = MAX310X_REG_1F,
.writeable_reg = max310x_reg_writeable,
.volatile_reg = max310x_reg_volatile,
@@ -1577,7 +1577,7 @@ static int max310x_i2c_extended_reg_enable(struct device *dev, bool enable)
static struct regmap_config regcfg_i2c = {
.reg_bits = 8,
.val_bits = 8,
- .cache_type = REGCACHE_RBTREE,
+ .cache_type = REGCACHE_MAPLE,
.writeable_reg = max310x_reg_writeable,
.volatile_reg = max310x_reg_volatile,
.precious_reg = max310x_reg_precious,