ACPI: Change acpi_device_always_present() into acpi_device_override_status()
authorHans de Goede <hdegoede@redhat.com>
Mon, 22 Nov 2021 17:05:31 +0000 (18:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:04:33 +0000 (11:04 +0100)
commit91f918b7885fb7757bf498a310cc65d71d3e6f72
tree85bfc77bf1fe44166c730bd0527f859f9cc0a012
parent1fd897834b772db18b5831797f3ec8d90e914124
ACPI: Change acpi_device_always_present() into acpi_device_override_status()

[ Upstream commit 1a68b346a2c9969c05e80a3b99a9ab160b5655c0 ]

Currently, acpi_bus_get_status() calls acpi_device_always_present() to
allow platform quirks to override the _STA return to report that a
device is present (status = ACPI_STA_DEFAULT) independent of the _STA
return.

In some cases it might also be useful to have the opposite functionality
and have a platform quirk which marks a device as not present (status = 0)
to work around ACPI table bugs.

Change acpi_device_always_present() into a more generic
acpi_device_override_status() function to allow this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/bus.c
drivers/acpi/x86/utils.c
include/acpi/acpi_bus.h