diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-05 11:07:47 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-05 13:55:58 -0400 |
commit | 5204f5e3f5b3c706e52682590de5974a82ea54f9 (patch) | |
tree | 3ec502adf5640df58f5f799f1d242944e403d8f0 /drivers | |
parent | b33f9cbd67ba1a1c46879ec66467269f09cde8e5 (diff) |
regmap: Remove bitrotted module_put()s
The conversion to per bus type registration functions means we don't need
to do module_get()s to hold the bus types in memory (their users will link
to them) so we removed all those calls. This left module_put() calls in
the cleanup paths which aren't needed and which cause unbalanced puts if
we ever try to unload anything.
Reported-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/regmap/regmap.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 0eef4da1ac61..20663f8dae45 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c | |||
@@ -168,13 +168,11 @@ struct regmap *regmap_init(struct device *dev, | |||
168 | map->work_buf = kmalloc(map->format.buf_size, GFP_KERNEL); | 168 | map->work_buf = kmalloc(map->format.buf_size, GFP_KERNEL); |
169 | if (map->work_buf == NULL) { | 169 | if (map->work_buf == NULL) { |
170 | ret = -ENOMEM; | 170 | ret = -ENOMEM; |
171 | goto err_bus; | 171 | goto err_map; |
172 | } | 172 | } |
173 | 173 | ||
174 | return map; | 174 | return map; |
175 | 175 | ||
176 | err_bus: | ||
177 | module_put(map->bus->owner); | ||
178 | err_map: | 176 | err_map: |
179 | kfree(map); | 177 | kfree(map); |
180 | err: | 178 | err: |
@@ -188,7 +186,6 @@ EXPORT_SYMBOL_GPL(regmap_init); | |||
188 | void regmap_exit(struct regmap *map) | 186 | void regmap_exit(struct regmap *map) |
189 | { | 187 | { |
190 | kfree(map->work_buf); | 188 | kfree(map->work_buf); |
191 | module_put(map->bus->owner); | ||
192 | kfree(map); | 189 | kfree(map); |
193 | } | 190 | } |
194 | EXPORT_SYMBOL_GPL(regmap_exit); | 191 | EXPORT_SYMBOL_GPL(regmap_exit); |