summaryrefslogtreecommitdiff
path: root/drivers/base/regmap
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r--drivers/base/regmap/internal.h2
-rw-r--r--drivers/base/regmap/regcache-flat.c4
-rw-r--r--drivers/base/regmap/regcache-maple.c8
-rw-r--r--drivers/base/regmap/regcache-rbtree.c8
4 files changed, 8 insertions, 14 deletions
diff --git a/drivers/base/regmap/internal.h b/drivers/base/regmap/internal.h
index 55273a6178f8..a6e4689000af 100644
--- a/drivers/base/regmap/internal.h
+++ b/drivers/base/regmap/internal.h
@@ -189,7 +189,7 @@ struct regcache_ops {
const char *name;
enum regcache_type type;
int (*init)(struct regmap *map);
- int (*exit)(struct regmap *map);
+ void (*exit)(struct regmap *map);
int (*populate)(struct regmap *map);
#ifdef CONFIG_DEBUG_FS
void (*debugfs_init)(struct regmap *map);
diff --git a/drivers/base/regmap/regcache-flat.c b/drivers/base/regmap/regcache-flat.c
index 025e6749bb24..be8497fd240c 100644
--- a/drivers/base/regmap/regcache-flat.c
+++ b/drivers/base/regmap/regcache-flat.c
@@ -53,7 +53,7 @@ err_free:
return -ENOMEM;
}
-static int regcache_flat_exit(struct regmap *map)
+static void regcache_flat_exit(struct regmap *map)
{
struct regcache_flat_data *cache = map->cache;
@@ -62,8 +62,6 @@ static int regcache_flat_exit(struct regmap *map)
kfree(cache);
map->cache = NULL;
-
- return 0;
}
static int regcache_flat_populate(struct regmap *map)
diff --git a/drivers/base/regmap/regcache-maple.c b/drivers/base/regmap/regcache-maple.c
index 49ba7282e4b8..e46fe5c32b7f 100644
--- a/drivers/base/regmap/regcache-maple.c
+++ b/drivers/base/regmap/regcache-maple.c
@@ -112,7 +112,7 @@ static int regcache_maple_drop(struct regmap *map, unsigned int min,
unsigned long *entry, *lower, *upper;
/* initialized to work around false-positive -Wuninitialized warning */
unsigned long lower_index = 0, lower_last = 0;
- unsigned long upper_index, upper_last;
+ unsigned long upper_index = 0, upper_last = 0;
int ret = 0;
lower = NULL;
@@ -307,7 +307,7 @@ static int regcache_maple_init(struct regmap *map)
return 0;
}
-static int regcache_maple_exit(struct regmap *map)
+static void regcache_maple_exit(struct regmap *map)
{
struct maple_tree *mt = map->cache;
MA_STATE(mas, mt, 0, UINT_MAX);
@@ -315,7 +315,7 @@ static int regcache_maple_exit(struct regmap *map)
/* if we've already been called then just return */
if (!mt)
- return 0;
+ return;
mas_lock(&mas);
mas_for_each(&mas, entry, UINT_MAX)
@@ -325,8 +325,6 @@ static int regcache_maple_exit(struct regmap *map)
kfree(mt);
map->cache = NULL;
-
- return 0;
}
static int regcache_maple_insert_block(struct regmap *map, int first,
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
index a69e8b4c359b..520d5f8ba3cd 100644
--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/drivers/base/regmap/regcache-rbtree.c
@@ -16,7 +16,7 @@
static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
unsigned int value);
-static int regcache_rbtree_exit(struct regmap *map);
+static void regcache_rbtree_exit(struct regmap *map);
struct regcache_rbtree_node {
/* block of adjacent registers */
@@ -196,7 +196,7 @@ static int regcache_rbtree_init(struct regmap *map)
return 0;
}
-static int regcache_rbtree_exit(struct regmap *map)
+static void regcache_rbtree_exit(struct regmap *map)
{
struct rb_node *next;
struct regcache_rbtree_ctx *rbtree_ctx;
@@ -205,7 +205,7 @@ static int regcache_rbtree_exit(struct regmap *map)
/* if we've already been called then just return */
rbtree_ctx = map->cache;
if (!rbtree_ctx)
- return 0;
+ return;
/* free up the rbtree */
next = rb_first(&rbtree_ctx->root);
@@ -221,8 +221,6 @@ static int regcache_rbtree_exit(struct regmap *map)
/* release the resources */
kfree(map->cache);
map->cache = NULL;
-
- return 0;
}
static int regcache_rbtree_populate(struct regmap *map)