summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/device_pm.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-01 03:38:43 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-01 03:38:43 +0200
commitef5f5de069bd9081a7ddf6998269b58fc65e27ef (patch)
tree21d53507543248f81725cbc486625f77562f935d /drivers/acpi/device_pm.c
parent73990fc810bf84c5338d9596f8af8d70fe90ac72 (diff)
parente91a398c31cef2d51786642e372c503cd43fba90 (diff)
downloadblackbird-obmc-linux-ef5f5de069bd9081a7ddf6998269b58fc65e27ef.tar.gz
blackbird-obmc-linux-ef5f5de069bd9081a7ddf6998269b58fc65e27ef.zip
Merge branch 'acpi-pm'
* acpi-pm: ACPI / bus: Move duplicate code to a separate new function mfd: Add support for Intel Sunrisepoint LPSS devices dmaengine: add a driver for Intel integrated DMA 64-bit mfd: make mfd_remove_devices() iterate in reverse order driver core: implement device_for_each_child_reverse() klist: implement klist_prev() Driver core: wakeup the parent device before trying probe ACPI / PM: Attach ACPI power domain only once PM / QoS: Make it possible to expose device latency tolerance to userspace ACPI / PM: Update the copyright notice and description of power.c
Diffstat (limited to 'drivers/acpi/device_pm.c')
-rw-r--r--drivers/acpi/device_pm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/device_pm.c b/drivers/acpi/device_pm.c
index da0867899d10..4806b7f856c4 100644
--- a/drivers/acpi/device_pm.c
+++ b/drivers/acpi/device_pm.c
@@ -1119,6 +1119,14 @@ int acpi_dev_pm_attach(struct device *dev, bool power_on)
if (dev->pm_domain)
return -EEXIST;
+ /*
+ * Only attach the power domain to the first device if the
+ * companion is shared by multiple. This is to prevent doing power
+ * management twice.
+ */
+ if (!acpi_device_is_first_physical_node(adev, dev))
+ return -EBUSY;
+
acpi_add_pm_notifier(adev, dev, acpi_pm_notify_work_func);
dev->pm_domain = &acpi_general_pm_domain;
if (power_on) {
OpenPOWER on IntegriCloud