Skip to content

Commit ce245ff

Browse files
superm1opsiff
authored andcommitted
ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case
[ 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 <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Mario Limonciello <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 66613b13cde9d10ebe8c548a13fa08f441e21437)
1 parent 0f36dac commit ce245ff

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
@@ -1120,13 +1120,13 @@ void acpi_os_set_prepare_extended_sleep(int (*func)(u8 sleep_state,
11201120

11211121
acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state,
11221122
u32 val_a, u32 val_b);
1123-
#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
11241123
struct acpi_s2idle_dev_ops {
11251124
struct list_head list_node;
11261125
void (*prepare)(void);
11271126
void (*check)(void);
11281127
void (*restore)(void);
11291128
};
1129+
#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
11301130
int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg);
11311131
void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg);
11321132
int acpi_get_lps0_constraint(struct acpi_device *adev);
@@ -1135,6 +1135,13 @@ static inline int acpi_get_lps0_constraint(struct device *dev)
11351135
{
11361136
return ACPI_STATE_UNKNOWN;
11371137
}
1138+
static inline int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg)
1139+
{
1140+
return -ENODEV;
1141+
}
1142+
static inline void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg)
1143+
{
1144+
}
11381145
#endif /* CONFIG_SUSPEND && CONFIG_X86 */
11391146
void arch_reserve_mem_area(acpi_physical_address addr, size_t size);
11401147
#else

0 commit comments

Comments
 (0)