Merge branch 'acpi-pm' into acpi-cleanup-next

The following commits depend on the 'acpi-pm' material.
ACPI / scan: Make scanning of fixed devices follow the general scheme

Make acpi_bus_scan_fixed() use device_attach() directly to attach
drivers, if any, to the fixed devices in analogy with how
acpi_bus_scan() works, which allows the last argument of
acpi_add_single_object() to be dropped and the manipulation of the
flags.match_driver bit to be moved to acpi_init_device_object()
and acpi_device_add_finalize().

After these changes all of the functions for the initialization
and registration of struct acpi_device objects work in the same
way for all of them.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
ACPI / scan: Make namespace scanning and trimming mutually exclusive

There is no guarantee that acpi_bus_scan() and acpi_bus_trim() will
not be run in parallel for the same scope of the ACPI namespace,
which may lead to a great deal of confusion, so introduce a new mutex
to prevent that from happening.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
ACPI / PM: Fix /proc/acpi/wakeup for devices w/o bus or parent

Fix /proc/acpi/wakeup for devices without bus or parent

This patch fixes printing the wakeup status for devices without a bus
or parent, such as laptop lid switches and sleep buttons. These devices
have an empty physical_node_list, because acpi_bind_one is never run
for them.

[rjw: White space and coding style.]
Signed-off-by: Andreas Fleig <andreasfleig@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Merge branch 'acpi-scan-next' into linux-next

* acpi-scan-next:
  ACPI / scan: Make namespace scanning and trimming mutually exclusive
Merge branch 'acpi-pm-next' into linux-next

* acpi-pm-next:
  ACPI / PM: Fix /proc/acpi/wakeup for devices w/o bus or parent
Merge branch 'acpi-cleanup-next' into linux-next

* acpi-cleanup-next:
  ACPI / scan: Make scanning of fixed devices follow the general scheme
cpufreq: Sort function prototypes properly

Move function prototypes to a place where they logically fit better.

Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Merge branch 'pm-cpufreq-next' into linux-next

* pm-cpufreq-next:
  cpufreq: Sort function prototypes properly