From 8de2f081ef8ee716663f916df9f2a7d015fa0dad Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Wed, 10 Aug 2011 17:14:41 +0900 Subject: regmap: Add functions to check for access on registers We're going to be using these in quite a few places so factor out the readable/writable/volatile/precious checks. Signed-off-by: Mark Brown --- drivers/base/regmap/regmap-debugfs.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/base/regmap/regmap-debugfs.c') diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 6e304a4e2706..fff8e832a985 100644 --- a/drivers/base/regmap/regmap-debugfs.c +++ b/drivers/base/regmap/regmap-debugfs.c @@ -52,12 +52,10 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf, tot_len = reg_len + val_len + 3; /* : \n */ for (i = 0; i < map->max_register; i++) { - if (map->readable_reg && - !map->readable_reg(map->dev, i)) + if (!regmap_readable(map, i)) continue; - if (map->precious_reg && - map->precious_reg(map->dev, i)) + if (regmap_precious(map, i)) continue; /* If we're in the region the user is trying to read */ -- cgit v1.2.2