Skip to content

Commit 89d5b71

Browse files
arndbrafaeljw
authored andcommitted
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 <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 9561de3 commit 89d5b71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/sleep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ void __weak acpi_s2idle_setup(void)
840840
s2idle_set_ops(&acpi_s2idle_ops);
841841
}
842842

843-
static void acpi_sleep_suspend_setup(void)
843+
static void __init acpi_sleep_suspend_setup(void)
844844
{
845845
bool suspend_ops_needed = false;
846846
int i;

0 commit comments

Comments
 (0)