ACPI fixes for 3.10-rc7

- Fix for a regression causing a failure to turn on some devices on
  some systems during initialization introduced by a recent revert of
  an ACPI PM change that broke something else.

- ACPI power resources initialization fix preventing a NULL pointer
  from being dereferenced in the acpi_add_power_resource() error code
  path.

- ACPI dock station driver fix that adds missing locking to
  write_undock().

- ACPI resources allocation fix changing the scope of an old
  workaround so that it doesn't affect systems that aren't actually
  buggy.

/
ACPI / LPSS: Power up LPSS devices during enumeration

Commit 7cd8407 (ACPI / PM: Do not execute _PS0 for devices without
_PSC during initialization) introduced a regression on some systems
with Intel Lynxpoint Low-Power Subsystem (LPSS) where some devices
need to be powered up during initialization, but their device objects
in the ACPI namespace have _PS0 and _PS3 only (without _PSC or power
resources).

To work around this problem, make the ACPI LPSS driver power up
devices it knows about by using a new helper function
acpi_device_fix_up_power() that does all of the necessary
sanity checks and calls acpi_dev_pm_explicit_set() to put the
device into D0.

Reported-and-tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
3 files changed