]> asedeno.scripts.mit.edu Git - linux.git/commit
regmap: Use _regmap_read in regmap_bulk_read
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Thu, 15 Feb 2018 17:52:18 +0000 (17:52 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 16 Feb 2018 12:03:30 +0000 (12:03 +0000)
commit186ba2eec275a5e4ee09d4b6a77c619e46fab9fd
tree7131a29eed8fca67a833a37ea0bdcc54ccad6ddc
parent1b079ca2c2e9a4652051bc4b62a5ef83d59d86bb
regmap: Use _regmap_read in regmap_bulk_read

Bulk reads may potentially read a lot of registers and regmap_read will
take and release the regmap lock for each register. Avoid bouncing
the lock so frequently by holding the lock locally and calling
_regmap_read instead. This also has the nice side-effect that all the
reads will be done atomically so no other threads can sneak a write in
during the regmap_bulk_read.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c