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)
commit7e24b4904db677549280a400685e33903896ab3c
tree13e6d1dffce17d0c4cc466e484599cfc38994a05
parentc599e61890bbf8775180afd5f193f0b9227457ce
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