Skip to content

Commit ea50e2a

Browse files
martinezjavierbroonie
authored andcommitted
regmap: Re-introduce bulk read support check in regmap_bulk_read()
Support for drivers to define bulk read/write callbacks in regmap_config was introduced by the commit d77e745 ("regmap: Add bulk read/write callbacks into regmap_config"), but this commit wrongly dropped a check in regmap_bulk_read() to determine whether bulk reads can be done or not. Before that commit, it was checked if map->bus was set. Now has to check if a map->read callback has been set. Fixes: d77e745 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: Javier Martinez Canillas <[email protected]> Reviewed-by: Marek Vasut <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent f2906aa commit ea50e2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/regmap/regmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3017,7 +3017,7 @@ int regmap_bulk_read(struct regmap *map, unsigned int reg, void *val,
30173017
if (val_count == 0)
30183018
return -EINVAL;
30193019

3020-
if (map->format.parse_inplace && (vol || map->cache_type == REGCACHE_NONE)) {
3020+
if (map->read && map->format.parse_inplace && (vol || map->cache_type == REGCACHE_NONE)) {
30213021
ret = regmap_raw_read(map, reg, val, val_bytes * val_count);
30223022
if (ret != 0)
30233023
return ret;

0 commit comments

Comments
 (0)