diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-02-24 23:07:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-10 11:06:22 +0300 |
commit | 0433686c6092f65b552eadad651f620e51b6aad1 (patch) | |
tree | de29f5fd74b5521747d780776509765b757507bd /include/linux/device.h | |
parent | 295209ca7b5b3aa6375d6190311b2ae804dbcf65 (diff) | |
download | linux-0433686c6092f65b552eadad651f620e51b6aad1.tar.xz |
devres: Pass unique name of the resource to devm_add_action()
Pass the unique name of the resource to devm_add_action(),
so it will be easier to debug managed resources.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230224200745.17324-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 19b6ba478fbf..0f128520f6e5 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -243,10 +243,13 @@ void __iomem *devm_of_iomap(struct device *dev, resource_size_t *size); /* allows to add/remove a custom action to devres stack */ -int devm_add_action(struct device *dev, void (*action)(void *), void *data); void devm_remove_action(struct device *dev, void (*action)(void *), void *data); void devm_release_action(struct device *dev, void (*action)(void *), void *data); +int __devm_add_action(struct device *dev, void (*action)(void *), void *data, const char *name); +#define devm_add_action(release, action, data) \ + __devm_add_action(release, action, data, #action) + static inline int devm_add_action_or_reset(struct device *dev, void (*action)(void *), void *data) { |