mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 06:04:48 -04:00
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: Heiner Kallweit <hkallweit1@gmail.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
committed by
Wolfram Sang
parent
3d6cd1af37
commit
29166faac5
@@ -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*/
|
||||
|
||||
Reference in New Issue
Block a user