ACPI: Clean up inclusions of ACPI header files
authorLv Zheng <lv.zheng@intel.com>
Tue, 3 Dec 2013 00:49:16 +0000 (08:49 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 7 Dec 2013 00:03:14 +0000 (01:03 +0100)
commit8b48463f89429af408ff695244dc627e1acff4f7
tree7870e8c2e8ed42df90ba79a809f1ec57656fedaf
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae
ACPI: Clean up inclusions of ACPI header files

Replace direct inclusions of <acpi/acpi.h>, <acpi/acpi_bus.h> and
<acpi/acpi_drivers.h>, which are incorrect, with <linux/acpi.h>
inclusions and remove some inclusions of those files that aren't
necessary.

First of all, <acpi/acpi.h>, <acpi/acpi_bus.h> and <acpi/acpi_drivers.h>
should not be included directly from any files that are built for
CONFIG_ACPI unset, because that generally leads to build warnings about
undefined symbols in !CONFIG_ACPI builds.  For CONFIG_ACPI set,
<linux/acpi.h> includes those files and for CONFIG_ACPI unset it
provides stub ACPI symbols to be used in that case.

Second, there are ordering dependencies between those files that always
have to be met.  Namely, it is required that <acpi/acpi_bus.h> be included
prior to <acpi/acpi_drivers.h> so that the acpi_pci_root declarations the
latter depends on are always there.  And <acpi/acpi.h> which provides
basic ACPICA type declarations should always be included prior to any other
ACPI headers in CONFIG_ACPI builds.  That also is taken care of including
<linux/acpi.h> as appropriate.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com> (drivers/pci stuff)
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> (Xen stuff)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
103 files changed:
arch/ia64/hp/common/aml_nfw.c
arch/x86/kernel/apic/apic_flat_64.c
arch/x86/kernel/apic/io_apic.c
arch/x86/pci/mmconfig_32.c
arch/x86/platform/olpc/olpc-xo15-sci.c
drivers/acpi/ac.c
drivers/acpi/acpi_extlog.c
drivers/acpi/acpi_pad.c
drivers/acpi/apei/einj.c
drivers/acpi/battery.c
drivers/acpi/blacklist.c
drivers/acpi/bus.c
drivers/acpi/button.c
drivers/acpi/custom_method.c
drivers/acpi/debugfs.c
drivers/acpi/dock.c
drivers/acpi/ec.c
drivers/acpi/event.c
drivers/acpi/fan.c
drivers/acpi/hed.c
drivers/acpi/numa.c
drivers/acpi/osl.c
drivers/acpi/pci_irq.c
drivers/acpi/pci_link.c
drivers/acpi/pci_root.c
drivers/acpi/power.c
drivers/acpi/proc.c
drivers/acpi/processor_core.c
drivers/acpi/processor_idle.c
drivers/acpi/processor_perflib.c
drivers/acpi/processor_thermal.c
drivers/acpi/processor_throttling.c
drivers/acpi/sbshc.c
drivers/acpi/scan.c
drivers/acpi/sleep.c
drivers/acpi/sysfs.c
drivers/acpi/thermal.c
drivers/acpi/utils.c
drivers/acpi/video.c
drivers/acpi/wakeup.c
drivers/ata/libata-acpi.c
drivers/ata/pata_acpi.c
drivers/char/hpet.c
drivers/char/tpm/tpm_acpi.c
drivers/char/tpm/tpm_ppi.c
drivers/gpu/drm/i915/intel_acpi.c
drivers/gpu/drm/nouveau/nouveau_acpi.c
drivers/gpu/drm/radeon/radeon_acpi.c
drivers/hv/vmbus_drv.c
drivers/hwmon/acpi_power_meter.c
drivers/hwmon/asus_atk0110.c
drivers/ide/ide-acpi.c
drivers/input/misc/atlas_btns.c
drivers/iommu/amd_iommu_init.c
drivers/iommu/intel_irq_remapping.c
drivers/pci/hotplug/acpiphp_ibm.c
drivers/pci/hotplug/pciehp.h
drivers/pci/ioapic.c
drivers/pci/pci-acpi.c
drivers/pci/pci-label.c
drivers/platform/x86/acer-wmi.c
drivers/platform/x86/asus-laptop.c
drivers/platform/x86/asus-wmi.c
drivers/platform/x86/classmate-laptop.c
drivers/platform/x86/dell-wmi-aio.c
drivers/platform/x86/dell-wmi.c
drivers/platform/x86/eeepc-laptop.c
drivers/platform/x86/eeepc-wmi.c
drivers/platform/x86/hp_accel.c
drivers/platform/x86/ideapad-laptop.c
drivers/platform/x86/intel-rst.c
drivers/platform/x86/intel-smartconnect.c
drivers/platform/x86/intel_menlow.c
drivers/platform/x86/intel_oaktrail.c
drivers/platform/x86/mxm-wmi.c
drivers/platform/x86/panasonic-laptop.c
drivers/platform/x86/pvpanic.c
drivers/platform/x86/samsung-q10.c
drivers/platform/x86/sony-laptop.c
drivers/platform/x86/tc1100-wmi.c
drivers/platform/x86/thinkpad_acpi.c
drivers/platform/x86/toshiba_acpi.c
drivers/platform/x86/toshiba_bluetooth.c
drivers/platform/x86/wmi.c
drivers/platform/x86/xo15-ebook.c
drivers/pnp/pnpacpi/core.c
drivers/pnp/pnpacpi/pnpacpi.h
drivers/sfi/sfi_acpi.c
drivers/staging/quickstart/quickstart.c
drivers/usb/core/usb-acpi.c
drivers/xen/xen-acpi-cpuhotplug.c
drivers/xen/xen-acpi-memhotplug.c
drivers/xen/xen-acpi-pad.c
drivers/xen/xen-acpi-processor.c
include/acpi/acpi_bus.h
include/acpi/acpi_drivers.h
include/linux/acpi_io.h
include/linux/ide.h
include/linux/iscsi_ibft.h
include/linux/pci_hotplug.h
include/linux/sfi_acpi.h
include/linux/tboot.h
tools/power/cpupower/debug/kernel/cpufreq-test_tsc.c