diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-09 13:35:43 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-10-10 10:24:33 +0100 |
commit | 04e016adcae28b65ddc9e756947fa1526a51c0b5 (patch) | |
tree | f4068bbe3609ee83f6e0eb98bb71772b1c467ebe /drivers/base | |
parent | 6e6ace00a045251bd172b9b9c2379857bbff3dc7 (diff) | |
download | blackbird-op-linux-04e016adcae28b65ddc9e756947fa1526a51c0b5.tar.gz blackbird-op-linux-04e016adcae28b65ddc9e756947fa1526a51c0b5.zip |
regmap: Warn on raw I/O as well as bulk reads that bypass cache
As with the bulk reads we really should be able to make these play
nicely with the cache but warn for now.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index d786ddcaf117..85bffddda530 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -377,6 +377,8 @@ int regmap_raw_write(struct regmap *map, unsigned int reg, { int ret; + WARN_ON(map->cache_type != REGCACHE_NONE); + mutex_lock(&map->lock); ret = _regmap_raw_write(map, reg, val, val_len); @@ -481,6 +483,8 @@ int regmap_raw_read(struct regmap *map, unsigned int reg, void *val, { int ret; + WARN_ON(map->cache_type != REGCACHE_NONE); + mutex_lock(&map->lock); ret = _regmap_raw_read(map, reg, val, val_len); |