Skip to content

Commit e1bdbbc

Browse files
superm1rafaeljw
authored andcommitted
ACPI: Add missing prototype for non CONFIG_SUSPEND/CONFIG_X86 case
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]>
1 parent 0af2f6b commit e1bdbbc

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

11261126
acpi_status acpi_os_prepare_extended_sleep(u8 sleep_state,
11271127
u32 val_a, u32 val_b);
1128-
#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
11291128
struct acpi_s2idle_dev_ops {
11301129
struct list_head list_node;
11311130
void (*prepare)(void);
11321131
void (*check)(void);
11331132
void (*restore)(void);
11341133
};
1134+
#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
11351135
int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg);
11361136
void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg);
11371137
int acpi_get_lps0_constraint(struct acpi_device *adev);
@@ -1140,6 +1140,13 @@ static inline int acpi_get_lps0_constraint(struct device *dev)
11401140
{
11411141
return ACPI_STATE_UNKNOWN;
11421142
}
1143+
static inline int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg)
1144+
{
1145+
return -ENODEV;
1146+
}
1147+
static inline void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg)
1148+
{
1149+
}
11431150
#endif /* CONFIG_SUSPEND && CONFIG_X86 */
11441151
void arch_reserve_mem_area(acpi_physical_address addr, size_t size);
11451152
#else

0 commit comments

Comments
 (0)