Messages in this thread Patch in this message | | | From | Doug Anderson <> | Subject | [PATCH 1/3] regmap: cache: regcache_hw_init() should use regmap_bulk_read() | Date | Fri, 27 Jun 2014 12:56:11 -0700 |
| |
We really should be using regmap_bulk_read() in regcache_hw_init(). The regmap_bulk_read() will translate into regmap_raw_read() when appropriate. Doing this fixes problems where regmap_smbus() will crash because they don't implement .read and .write.
Signed-off-by: Doug Anderson <dianders@chromium.org> --- drivers/base/regmap/regcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 29b4128..6447486 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -45,7 +45,7 @@ static int regcache_hw_init(struct regmap *map) tmp_buf = kmalloc(map->cache_size_raw, GFP_KERNEL); if (!tmp_buf) return -EINVAL; - ret = regmap_raw_read(map, 0, tmp_buf, + ret = regmap_bulk_read(map, 0, tmp_buf, map->num_reg_defaults_raw); map->cache_bypass = cache_bypass; if (ret < 0) { -- 2.0.0.526.g5318336
| |