diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-05-03 18:15:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-04 16:33:16 -0700 |
commit | d926d0e4c74cfcb42a05e91d1cdf698b41e1e118 (patch) | |
tree | 9d7cdc794f6c56ef728c751759d8ef639ee6f38f /include/linux/device.h | |
parent | 698cd2ddd851b34e7200b4f846ae68306e11bae4 (diff) | |
download | linux-d926d0e4c74cfcb42a05e91d1cdf698b41e1e118.tar.gz linux-d926d0e4c74cfcb42a05e91d1cdf698b41e1e118.tar.bz2 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.h | 2 |
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, |