Skip to content

Commit a00f3de

Browse files
committed
ACPI: PM: s2idle: Drop acpi_get_lps0_constraint()
Drop unused function acpi_get_lps0_constraint(). No functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/5032801.GXAFRqVoOG@rafael.j.wysocki
1 parent 211ddde commit a00f3de

2 files changed

Lines changed: 0 additions & 29 deletions

File tree

drivers/acpi/x86/s2idle.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -299,30 +299,6 @@ static void lpi_device_get_constraints(void)
299299
ACPI_FREE(out_obj);
300300
}
301301

302-
/**
303-
* acpi_get_lps0_constraint - Get the LPS0 constraint for a device.
304-
* @adev: Device to get the constraint for.
305-
*
306-
* The LPS0 constraint is the shallowest (minimum) power state in which the
307-
* device can be so as to allow the platform as a whole to achieve additional
308-
* energy conservation by utilizing a system-wide low-power state.
309-
*
310-
* Returns:
311-
* - ACPI power state value of the constraint for @adev on success.
312-
* - Otherwise, ACPI_STATE_UNKNOWN.
313-
*/
314-
int acpi_get_lps0_constraint(struct acpi_device *adev)
315-
{
316-
struct lpi_constraints *entry;
317-
318-
for_each_lpi_constraint(entry) {
319-
if (adev->handle == entry->handle)
320-
return entry->min_dstate;
321-
}
322-
323-
return ACPI_STATE_UNKNOWN;
324-
}
325-
326302
static void lpi_check_constraints(void)
327303
{
328304
struct lpi_constraints *entry;

include/linux/acpi.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,12 +1146,7 @@ struct acpi_s2idle_dev_ops {
11461146
#if defined(CONFIG_SUSPEND) && defined(CONFIG_X86)
11471147
int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg);
11481148
void acpi_unregister_lps0_dev(struct acpi_s2idle_dev_ops *arg);
1149-
int acpi_get_lps0_constraint(struct acpi_device *adev);
11501149
#else /* CONFIG_SUSPEND && CONFIG_X86 */
1151-
static inline int acpi_get_lps0_constraint(struct device *dev)
1152-
{
1153-
return ACPI_STATE_UNKNOWN;
1154-
}
11551150
static inline int acpi_register_lps0_dev(struct acpi_s2idle_dev_ops *arg)
11561151
{
11571152
return -ENODEV;

0 commit comments

Comments
 (0)