diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2011-11-16 14:34:04 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-11-17 11:51:27 -0500 |
commit | b44d48c1ccf70273a91b7d3a920b0b54c3cb314f (patch) | |
tree | 1208c5fa80a8e0b4f14844914afc76914572eb67 | |
parent | 064d4db11e23949c40b8a2f2f6be11c131b53932 (diff) |
regmap: Drop check whether a register is readable in regcache_read
One of the reasons for using a cache is to have a software shadow of a register
which is writable but not readable. This allows us to do a read-modify-write
operation on such a register.
Currently regcache checks whether a register is readable when performing a
cached read and returns an error if it is not. Drop this check, since it will
prevent us from using the cache for registers where read-back is not possible.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | drivers/base/regmap/regcache.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 6d93e49c462f..e21eebd36afa 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c | |||
@@ -199,9 +199,6 @@ int regcache_read(struct regmap *map, | |||
199 | 199 | ||
200 | BUG_ON(!map->cache_ops); | 200 | BUG_ON(!map->cache_ops); |
201 | 201 | ||
202 | if (!regmap_readable(map, reg)) | ||
203 | return -EIO; | ||
204 | |||
205 | if (!regmap_volatile(map, reg)) | 202 | if (!regmap_volatile(map, reg)) |
206 | return map->cache_ops->read(map, reg, value); | 203 | return map->cache_ops->read(map, reg, value); |
207 | 204 | ||