diff options
| author | 2019-06-26 12:39:34 +0100 | |
|---|---|---|
| committer | 2019-06-26 12:39:34 +0100 | |
| commit | 53c8b29abe42e5601cfa0ea5962532f0cfdec8a0 (patch) | |
| tree | cad53f42ce7a03c39a984bcdbcc42cd47f1af6f9 /drivers/base/devres.c | |
| parent | ASoC: soc-core: don't use soc_find_component() at snd_soc_find_dai() (diff) | |
| parent | Linux 5.2-rc6 (diff) | |
| download | linux-dev-53c8b29abe42e5601cfa0ea5962532f0cfdec8a0.tar.xz linux-dev-53c8b29abe42e5601cfa0ea5962532f0cfdec8a0.zip | |
Merge tag 'v5.2-rc6' into asoc-5.3
Linux 5.2-rc6
Diffstat (limited to 'drivers/base/devres.c')
| -rw-r--r-- | drivers/base/devres.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/base/devres.c b/drivers/base/devres.c index e038e2b3b7ea..0bbb328bd17f 100644 --- a/drivers/base/devres.c +++ b/drivers/base/devres.c @@ -755,10 +755,32 @@ void devm_remove_action(struct device *dev, void (*action)(void *), void *data) WARN_ON(devres_destroy(dev, devm_action_release, devm_action_match, &devres)); - } EXPORT_SYMBOL_GPL(devm_remove_action); +/** + * devm_release_action() - release previously added custom action + * @dev: Device that owns the action + * @action: Function implementing the action + * @data: Pointer to data passed to @action implementation + * + * Releases and removes instance of @action previously added by + * devm_add_action(). Both action and data should match one of the + * existing entries. + */ +void devm_release_action(struct device *dev, void (*action)(void *), void *data) +{ + struct action_devres devres = { + .data = data, + .action = action, + }; + + WARN_ON(devres_release(dev, devm_action_release, devm_action_match, + &devres)); + +} +EXPORT_SYMBOL_GPL(devm_release_action); + /* * Managed kmalloc/kfree */ |
