Skip to content

Commit 66613b1

Browse files
superm1gregkh
authored andcommitted
ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case
[ Upstream commit e1bdbbc ] 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]>
1 parent b01a29a commit 66613b1

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

11111111
acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state,
11121112
u32 val_a, u32 val_b);
1113-
#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
11141113
struct acpi_s2idle_dev_ops {
11151114
struct list_head list_node;
11161115
void (*prepare)(void);
11171116
void (*check)(void);
11181117
void (*restore)(void);
11191118
};
1119+
#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
11201120
int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg);
11211121
void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg);
11221122
int acpi_get_lps0_constraint(struct acpi_device *adev);
@@ -1125,6 +1125,13 @@ static inline int acpi_get_lps0_constraint(struct device *dev)
11251125
{
11261126
return ACPI_STATE_UNKNOWN;
11271127
}
1128+
static inline int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg)
1129+
{
1130+
return -ENODEV;
1131+
}
1132+
static inline void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg)
1133+
{
1134+
}
11281135
#endif /* CONFIG_SUSPEND && CONFIG_X86 */
11291136
void arch_reserve_mem_area(acpi_physical_address addr, size_t size);
11301137
#else

0 commit comments

Comments
 (0)