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>
 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*/