[PATCH v2 3/5] ACPI: Support __free() from cleanup.h for ACPI objects
Sakari Ailus <[email protected]>
| Newsgroups | org.kernel.vger.linux-media,org.kernel.vger.linux-acpi,org.kernel.vger.platform-driver-x86 |
|---|---|
| Organization | Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo |
| Message-ID | <[email protected]> |
Use DEFINE_FREE() to allow ACPI objects to be released automatically. Signed-off-by: Sakari Ailus <[email protected]> --- include/linux/acpi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 10d6c6c11bdf..c89390ac6287 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -62,6 +62,8 @@ static inline acpi_handle acpi_device_handle(struct acpi_device *adev) #define ACPI_HANDLE_FWNODE(fwnode) \ acpi_device_handle(to_acpi_device_node(fwnode)) +DEFINE_FREE(ACPI_FREE, void *, ACPI_FREE(_T)) + static inline struct fwnode_handle *acpi_alloc_fwnode_static(void) { struct fwnode_handle *fwnode; -- 2.47.3