From: Pawel Moll Date: Thu, 30 Jan 2014 13:26:32 +0000 (+0000) Subject: regmap: debugfs: "registers" & "access" for single register maps X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=676970da5cf6fec096945a8bbc19749089af57aa;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git regmap: debugfs: "registers" & "access" for single register maps When a map covers a single register, max_register is equal to 0, so the "registers" & "access" files were not created. Now they will be, as register 0 must be readable for such map to make sense. Signed-off-by: Pawel Moll Signed-off-by: Mark Brown --- diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index c5471cd6ebb7..45d812c0ea77 100644 --- a/drivers/base/regmap/regmap-debugfs.c +++ b/drivers/base/regmap/regmap-debugfs.c @@ -511,7 +511,7 @@ void regmap_debugfs_init(struct regmap *map, const char *name) debugfs_create_file("range", 0400, map->debugfs, map, ®map_reg_ranges_fops); - if (map->max_register) { + if (map->max_register || regmap_readable(map, 0)) { debugfs_create_file("registers", 0400, map->debugfs, map, ®map_map_fops); debugfs_create_file("access", 0400, map->debugfs,