Commit 29166faa authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Wolfram Sang

ACPI: Add helper acpi_use_parent_companion

In several drivers devices use the ACPI companion of the parent.
Add a helper for this use case to avoid code duplication.
Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent 3d6cd1af
......@@ -1539,4 +1539,9 @@ static inline void acpi_device_notify(struct device *dev) { }
static inline void acpi_device_notify_remove(struct device *dev) { }
#endif
static inline void acpi_use_parent_companion(struct device *dev)
{
ACPI_COMPANION_SET(dev, ACPI_COMPANION(dev->parent));
}
#endif /*_LINUX_ACPI_H*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment