summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/internal.h
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2013-02-20 12:15:23 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-04 10:33:03 +0800
commit065b4c587557dcd3dc8d3ff1ba2b9ecc6e0c6668 (patch)
treedfe0d20d12189d4471fd2feafca736ca67a2997a /drivers/base/regmap/internal.h
parent480738de0e076d759a973be623fac195cb901b82 (diff)
regmap: debugfs: Add a registers `range' file
This file lists the register ranges in the register map. The condition to split the range is based on whether the block is readable or not. Ensure that we lock the `debugfs_off_cache' list whenever we access and modify the list. There is a possible race otherwise between the read() operations of the `registers' file and the `range' file. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/internal.h')
-rw-r--r--drivers/base/regmap/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index 5a22bd33ce3d..dc23508745fe 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -76,6 +76,7 @@ struct regmap {
unsigned int debugfs_tot_len;
struct list_head debugfs_off_cache;
+ struct mutex cache_lock;
#endif
unsigned int max_register;