summaryrefslogtreecommitdiff
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorVivek Gautam <vivek.gautam@codeaurora.org>2018-06-27 18:20:56 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-09 12:14:31 +0200
commit1689cac5b32a6db6f812e8063ea418a7cf023d03 (patch)
tree165be23752f68df71466619de2601bcc12d3714d /include/linux/device.h
parente88728f46cfbb59cc7e7acf1d230c05ec093764e (diff)
driver core: Add flag to autoremove device link on supplier unbind
Add a flag to autoremove the device links on supplier driver unbind. This obviates the need to explicitly delete the link in the remove path. We remove these links only when the supplier's link to its consumers has gone to DL_STATE_SUPPLIER_UNBIND state. Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org> Suggested-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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 3929805cdd59..e80920452b49 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -787,11 +787,13 @@ enum device_link_state {
* AUTOREMOVE_CONSUMER: Remove the link automatically on consumer driver unbind.
* PM_RUNTIME: If set, the runtime PM framework will use this link.
* RPM_ACTIVE: Run pm_runtime_get_sync() on the supplier during link creation.
+ * AUTOREMOVE_SUPPLIER: Remove the link automatically on supplier driver unbind.
*/
#define DL_FLAG_STATELESS BIT(0)
#define DL_FLAG_AUTOREMOVE_CONSUMER BIT(1)
#define DL_FLAG_PM_RUNTIME BIT(2)
#define DL_FLAG_RPM_ACTIVE BIT(3)
+#define DL_FLAG_AUTOREMOVE_SUPPLIER BIT(4)
/**
* struct device_link - Device link representation.