summaryrefslogtreecommitdiff
path: root/include/linux/device
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2025-02-20 18:20:27 +0200
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>2025-04-28 09:30:41 +0200
commite383bb8f958444620d96386811aacf6a49757996 (patch)
treee770fc7c2667a0a0611d7868781c6f1f5eab36db /include/linux/device
parentf5e5631df596ade5875ba1dc5d640611745d0c0d (diff)
devres: Add devm_is_action_added() helper
In some code we would like to know if the action in device managed resources was added by devm_add_action() family of calls. Introduce a helper for that. Reviewed-by: Raag Jadav <raag.jadav@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Zijun Hu <quic_zijuhu@quicinc.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20250220162238.2738038-3-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'include/linux/device')
-rw-r--r--include/linux/device/devres.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/device/devres.h b/include/linux/device/devres.h
index 9cd1787ef28e..ae696d10faff 100644
--- a/include/linux/device/devres.h
+++ b/include/linux/device/devres.h
@@ -165,4 +165,6 @@ static inline int __devm_add_action_or_reset(struct device *dev, void (*action)(
#define devm_add_action_or_reset(dev, action, data) \
__devm_add_action_or_reset(dev, action, data, #action)
+bool devm_is_action_added(struct device *dev, void (*action)(void *), void *data);
+
#endif /* _DEVICE_DEVRES_H_ */