[PATCH 02/11] nvmem: regmap: do not use regmap_bulk_read
Ahmad Fatoum
a.fatoum at pengutronix.de
Fri Oct 20 00:18:44 PDT 2023
nvmem_regmap_read is only ever called with stride_size == value_size, so
reading one stride's worth with barebox' variant of regmap_bulk_read is
identical to just calling regmap_read a single time, so let's just do
that.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
drivers/nvmem/regmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/regmap.c b/drivers/nvmem/regmap.c
index db0221bae325..313e92fb7da8 100644
--- a/drivers/nvmem/regmap.c
+++ b/drivers/nvmem/regmap.c
@@ -32,7 +32,7 @@ static int nvmem_regmap_read(void *ctx, unsigned offset, void *buf, size_t bytes
return -EINVAL;
for (i = roffset; i < roffset + rbytes; i += stride) {
- ret = regmap_bulk_read(map, i, &val, stride);
+ ret = regmap_read(map, i, &val);
if (ret) {
dev_err(regmap_get_device(map), "Can't read data%d (%d)\n", i, ret);
return ret;
--
2.39.2
More information about the barebox
mailing list