mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02: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:
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*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user