There is no reason this file cannot be an arm64 specific stub holder so move the file and change the Kconfig to match.
Signed-off-by: Graeme Gregory graeme.gregory@linaro.org --- arch/arm64/kernel/Makefile | 2 +- arch/arm64/kernel/acpi_sleep.c | 28 ++++++++++++++++++++++++++++ drivers/acpi/Makefile | 4 +--- drivers/acpi/sleep_arm.c | 28 ---------------------------- 4 files changed, 30 insertions(+), 32 deletions(-) create mode 100644 arch/arm64/kernel/acpi_sleep.c delete mode 100644 drivers/acpi/sleep_arm.c
diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 8bdc6bd..f2c488b 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -34,7 +34,7 @@ arm64-obj-$(CONFIG_KGDB) += kgdb.o arm64-obj-$(CONFIG_EFI) += efi.o efi-stub.o efi-entry.o arm64-obj-$(CONFIG_PCI) += pci.o arm64-obj-$(CONFIG_ARMV8_DEPRECATED) += armv8_deprecated.o -arm64-obj-$(CONFIG_ACPI) += acpi.o +arm64-obj-$(CONFIG_ACPI) += acpi.o acpi_sleep.o
obj-y += $(arm64-obj-y) vdso/ obj-m += $(arm64-obj-m) diff --git a/arch/arm64/kernel/acpi_sleep.c b/arch/arm64/kernel/acpi_sleep.c new file mode 100644 index 0000000..54578ef --- /dev/null +++ b/arch/arm64/kernel/acpi_sleep.c @@ -0,0 +1,28 @@ +/* + * ARM64 Specific Sleep Functionality + * + * Copyright (C) 2013-2014, Linaro Ltd. + * Author: Graeme Gregory graeme.gregory@linaro.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include <linux/acpi.h> + +/* + * Currently the ACPI 5.1 standard does not define S states in a + * manner which is usable for ARM64. These two stubs are sufficient + * that system initialises and device PM works. + */ +u32 acpi_target_system_state(void) +{ + return ACPI_STATE_S0; +} +EXPORT_SYMBOL_GPL(acpi_target_system_state); + +int __init acpi_sleep_init(void) +{ + return -ENOSYS; +} diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index bcec54e..753785d 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -23,9 +23,7 @@ acpi-y += nvs.o
# Power management related files acpi-y += wakeup.o -ifeq ($(ARCH), arm64) -acpi-y += sleep_arm.o -else # X86, IA64 +ifneq (,$(findstring $(ARCH),x86 ia64)) acpi-y += sleep.o endif acpi-y += device_pm.o diff --git a/drivers/acpi/sleep_arm.c b/drivers/acpi/sleep_arm.c deleted file mode 100644 index 54578ef..0000000 --- a/drivers/acpi/sleep_arm.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * ARM64 Specific Sleep Functionality - * - * Copyright (C) 2013-2014, Linaro Ltd. - * Author: Graeme Gregory graeme.gregory@linaro.org - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - */ - -#include <linux/acpi.h> - -/* - * Currently the ACPI 5.1 standard does not define S states in a - * manner which is usable for ARM64. These two stubs are sufficient - * that system initialises and device PM works. - */ -u32 acpi_target_system_state(void) -{ - return ACPI_STATE_S0; -} -EXPORT_SYMBOL_GPL(acpi_target_system_state); - -int __init acpi_sleep_init(void) -{ - return -ENOSYS; -}