From 065b4c587557dcd3dc8d3ff1ba2b9ecc6e0c6668 Mon Sep 17 00:00:00 2001 From: Dimitris Papastamos Date: Wed, 20 Feb 2013 12:15:23 +0000 Subject: 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 Signed-off-by: Mark Brown --- drivers/base/regmap/internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/base/regmap/internal.h') diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h index 5a22bd3..dc23508 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; -- cgit v1.1