projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
267f3e4
)
regmap: Clean up hwspinlock on regmap exit
author
Mark Brown
<broonie@kernel.org>
Fri, 3 Nov 2017 19:53:56 +0000
(19:53 +0000)
committer
Mark Brown
<broonie@kernel.org>
Fri, 3 Nov 2017 19:53:56 +0000
(19:53 +0000)
We should free any hwspinlocks when we destroy the regmap, do so.
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regmap.c
patch
|
blob
|
history
diff --git
a/drivers/base/regmap/regmap.c
b/drivers/base/regmap/regmap.c
index 5ff549fa880becc39a8aa53b324a70744711bfa2..bfe2f250d011eceb5017878af79336a194ceb5dd 100644
(file)
--- a/
drivers/base/regmap/regmap.c
+++ b/
drivers/base/regmap/regmap.c
@@
-1305,6
+1305,8
@@
void regmap_exit(struct regmap *map)
kfree(async->work_buf);
kfree(async);
}
+ if (IS_ENABLED(REGMAP_HWSPINLOCK) && map->hwlock)
+ hwspin_lock_free(map->hwlock);
kfree(map);
}
EXPORT_SYMBOL_GPL(regmap_exit);