summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorMark Brown2012-05-03 19:15:13 +0200
committerGreg Kroah-Hartman2012-05-05 01:33:16 +0200
commitd926d0e4c74cfcb42a05e91d1cdf698b41e1e118 (patch)
tree9d7cdc794f6c56ef728c751759d8ef639ee6f38f /include/linux/device.h
parentdevres: Clarify documentation for devres_destroy() (diff)
downloadkernel-qcow2-linux-d926d0e4c74cfcb42a05e91d1cdf698b41e1e118.tar.gz
kernel-qcow2-linux-d926d0e4c74cfcb42a05e91d1cdf698b41e1e118.tar.xz
kernel-qcow2-linux-d926d0e4c74cfcb42a05e91d1cdf698b41e1e118.zip
devres: Add devres_release()
APIs using devres frequently want to implement a "remove and free the resource" operation so it seems sensible that they should be able to just have devres do the freeing for them since that's a big part of what devres is all about. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 3ab4d63609b6..863acf8a0dce 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -541,6 +541,8 @@ extern void *devres_remove(struct device *dev, dr_release_t release,
dr_match_t match, void *match_data);
extern int devres_destroy(struct device *dev, dr_release_t release,
dr_match_t match, void *match_data);
+extern int devres_release(struct device *dev, dr_release_t release,
+ dr_match_t match, void *match_data);
/* devres group */
extern void * __must_check devres_open_group(struct device *dev, void *id,