]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ACPI: Define acpi_put_table cleanup handler and acpi_get_table_pointer() helper
authorBen Horgan <ben.horgan@arm.com>
Wed, 19 Nov 2025 12:22:38 +0000 (12:22 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Wed, 19 Nov 2025 18:34:19 +0000 (18:34 +0000)
commit96f4a4d53e6660d9b62e8d739388267fbb660e9f
tree700e1d58a452c072ce237ba5c72e8b7bb3cb5a30
parentf5915600cc4ca0338a37d5a8a4032e25d939156b
ACPI: Define acpi_put_table cleanup handler and acpi_get_table_pointer() helper

Define a cleanup helper for use with __free to release the acpi table when
the pointer goes out of scope. Also, introduce the helper
acpi_get_table_pointer() to simplify a commonly used pattern involving
acpi_get_table().

These are first used in a subsequent commit.

Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Reviewed-by: Fenghua Yu <fenghuay@nvidia.com>
Tested-by: Fenghua Yu <fenghuay@nvidia.com>
Tested-by: Carl Worth <carl@os.amperecomputing.com>
Tested-by: Gavin Shan <gshan@redhat.com>
Tested-by: Zeng Heng <zengheng4@huawei.com>
Tested-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Tested-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Ben Horgan <ben.horgan@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
include/linux/acpi.h