mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
regcache: Make ->exit() callback return void
We do not check an error code from ->exit() callback, nor we ever return one (it's always 0, meaning success). Make ->exit() callback return void. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260618194036.3275202-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
dc59e4fea9
commit
e427e1832b
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ static int regcache_flat_init(struct regmap *map)
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user