[PATCH 02/11] nvmem: regmap: do not use regmap_bulk_read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux