From: Jeongtae Park Date: Thu, 1 Jul 2021 14:26:30 +0000 (+0900) Subject: regmap: fix the offset of register error log X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ab32c83a4e85e01f559d0abbff6e42b304775233;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git regmap: fix the offset of register error log [ Upstream commit 1852f5ed358147095297a09cc3c6f160208a676d ] This patch fixes the offset of register error log by using regmap_get_offset(). Signed-off-by: Jeongtae Park Link: https://lore.kernel.org/r/20210701142630.44936-1-jeongtae.park@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index cd984b59a8a1..40a9e5378633 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -1375,7 +1375,7 @@ int _regmap_raw_write(struct regmap *map, unsigned int reg, if (ret) { dev_err(map->dev, "Error in caching of register: %x ret: %d\n", - reg + i, ret); + reg + regmap_get_offset(map, i), ret); return ret; } }