ACPI / PM: Attach ACPI power domain only once
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 27 Jul 2015 15:03:57 +0000 (18:03 +0300)
committerLee Jones <lee.jones@linaro.org>
Tue, 28 Jul 2015 07:50:42 +0000 (08:50 +0100)
commit712e960f0ee9337f3473ba3de2bcfc7e87b7c5a4
tree13e6d1dffce17d0c4cc466e484599cfc38994a05
parent13b2c4a0c3b1cd37ee6bcfbb5b6e2b94e9a75364
ACPI / PM: Attach ACPI power domain only once

Some devices, like MFD subdevices, share a single ACPI companion device so
that they are able to access their resources and children. However,
currently all these subdevices are attached to the ACPI power domain and
this might cause that the power methods for the companion device get called
more than once.

In order to solve this we attach the ACPI power domain only to the first
physical device that is bound to the ACPI companion device. In case of MFD
devices, this is the parent MFD device itself.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/acpi/device_pm.c
drivers/acpi/internal.h
drivers/acpi/scan.c