[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180212181547.2415-4-ckeepax@opensource.cirrus.com>
Date: Mon, 12 Feb 2018 18:15:47 +0000
From: Charles Keepax <ckeepax@...nsource.cirrus.com>
To: <broonie@...nel.org>
CC: <david.rhodes@...rus.com>, <linux-kernel@...r.kernel.org>,
<patches@...nsource.cirrus.com>
Subject: [PATCH 4/4] regmap: Use helper function for register offset
As a helper function exists for calculating register offsets lets use
that rather than open coding with the reg_stride.
Signed-off-by: Charles Keepax <ckeepax@...nsource.cirrus.com>
---
drivers/base/regmap/regmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 8594b02aa3e67..6342eaefc2189 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1993,7 +1993,7 @@ int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
return -EINVAL;
}
- ret = regmap_write(map, reg + (i * map->reg_stride),
+ ret = regmap_write(map, reg + regmap_get_offset(map, i),
ival);
if (ret)
return ret;
--
2.11.0
Powered by blists - more mailing lists