diff options
author | Arnd Bergmann <arnd@arndb.de> | 2023-06-01 23:33:15 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-06-05 19:15:44 +0200 |
commit | 89d5b7178d4edc2a5d7b6070923fe2d2125ec52a (patch) | |
tree | fc436b91c7703ae80ef1bb8f8afa38d9aaf4a8f3 /drivers/acpi/sleep.c | |
parent | Linux 6.4-rc5 (diff) | |
download | linux-89d5b7178d4edc2a5d7b6070923fe2d2125ec52a.tar.xz linux-89d5b7178d4edc2a5d7b6070923fe2d2125ec52a.zip |
ACPI: PM: s2idle: fix section mismatch warning
The acpi_sleep_suspend_setup() function is missing an __init annotation,
which causes a warning in rare configurations that end up not inlining
it into its caller:
WARNING: modpost: vmlinux.o: section mismatch in reference: acpi_sleep_suspend_setup (section: .text) -> acpi_s2idle_setup (section: .init.text)
It's only called from an __init function, so adding the annotation is
correct here.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r-- | drivers/acpi/sleep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c index 72470b9f16c4..552adc04743b 100644 --- a/drivers/acpi/sleep.c +++ b/drivers/acpi/sleep.c @@ -840,7 +840,7 @@ void __weak acpi_s2idle_setup(void) s2idle_set_ops(&acpi_s2idle_ops); } -static void acpi_sleep_suspend_setup(void) +static void __init acpi_sleep_suspend_setup(void) { bool suspend_ops_needed = false; int i; |