Skip to content

Commit 1c9e406

Browse files
superm1smb49
authored andcommitted
ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case
BugLink: https://bugs.launchpad.net/bugs/2120812 [ Upstream commit e1bdbbc98279164d910d2de82a745f090a8b249f ] acpi_register_lps0_dev() and acpi_unregister_lps0_dev() may be used in drivers that don't require CONFIG_SUSPEND or compile on !X86. Add prototypes for those cases. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202502191627.fRgoBwcZ-lkp@intel.com/ Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://patch.msgid.link/20250407183656.1503446-1-superm1@kernel.org Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Noah Wager <noah.wager@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent 0c2aac2 commit 1c9e406

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

include/linux/acpi.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1115,13 +1115,13 @@ void acpi_os_set_prepare_extended_sleep(int (*func)(u8 sleep_state,
11151115

11161116
acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state,
11171117
u32 val_a, u32 val_b);
1118-
#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
11191118
struct acpi_s2idle_dev_ops {
11201119
struct list_head list_node;
11211120
void (*prepare)(void);
11221121
void (*check)(void);
11231122
void (*restore)(void);
11241123
};
1124+
#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
11251125
int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg);
11261126
void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg);
11271127
int acpi_get_lps0_constraint(struct acpi_device *adev);
@@ -1130,6 +1130,13 @@ static inline int acpi_get_lps0_constraint(struct device *dev)
11301130
{
11311131
return ACPI_STATE_UNKNOWN;
11321132
}
1133+
static inline int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg)
1134+
{
1135+
return -ENODEV;
1136+
}
1137+
static inline void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg)
1138+
{
1139+
}
11331140
#endif /* CONFIG_SUSPEND && CONFIG_X86 */
11341141
void arch_reserve_mem_area(acpi_physical_address addr, size_t size);
11351142
#else

0 commit comments

Comments
 (0)