ACPI: scan: Define acpi_bus_put_acpi_device() as static inline
Subsystems (2)
PATCH 1/1 ACPI: scan: Define acpi_bus_put_acpi_device() as static inline
From: Rafael J. Wysocki <[email protected]>
Since acpi_bus_put_acpi_device() is a synonym for acpi_dev_put(), define it as static inline in analogy with the latter.
No functional impact.
Signed-off-by Rafael J. Wysocki <[email protected]>
--- drivers/acpi/scan.c | 5 ----- include/acpi/acpi_bus.h | 9 +++++++-- 2 files changed, 7 insertions(+), 7 deletions(-)
drivers/acpi/scan.c +0 -5
@@ -608,11 +608,6 @@ struct acpi_device *acpi_bus_get_acpi_dereturn handle_to_device (handle, get_acpi_device); } -void acpi_bus_put_acpi_device (struct acpi_device *adev) -{ -acpi_dev_put (adev); -} -static struct acpi_device_bus_id *acpi_device_bus_id_match (const char *dev_id) {struct acpi_device_bus_id *acpi_device_bus_id;
include/acpi/acpi_bus.h +7 -2
@@ -504,8 +504,6 @@ extern int unregister_acpi_notifier(stru*/ int acpi_bus_get_device (acpi_handle handle,struct acpi_device **device); -struct acpi_device *acpi_bus_get_acpi_device (acpi_handle handle); -void acpi_bus_put_acpi_device (struct acpi_device *adev);acpi_status acpi_bus_get_status_handle (acpi_handle handle,unsigned long long *sta);int acpi_bus_get_status (struct acpi_device *device);
@@ -726,6 +724,13 @@ static inline void acpi_dev_put(struct a {put_device (&adev->dev); } + +struct acpi_device *acpi_bus_get_acpi_device (acpi_handle handle); + +static inline void acpi_bus_put_acpi_device (struct acpi_device *adev) +{ +acpi_dev_put (adev); +}#else /* CONFIG_ACPI */ static inline int register_acpi_bus_type (void *bus) {return 0 ; }
Quoted 6 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Since
acpi_bus_put_acpi_device()is a synonym foracpi_dev_put(), define it as static inline in analogy with the latter.No functional impact.
No objections, thanks!
Reviewed-by Andy Shevchenko <[email protected]>
Quoted 52 lines
Signed-off-by Rafael J. Wysocki <[email protected]>--- drivers/acpi/scan.c | 5 ----- include/acpi/acpi_bus.h | 9 +++++++-- 2 files changed, 7 insertions(+), 7 deletions(-)Index:
linux-pm/drivers/acpi/scan.c
===================================================================drivers/acpi/scan.c +0
-5@@ -608,11 +608,6 @@ struct acpi_device *acpi_bus_get_acpi_dereturn handle_to_device (handle, get_acpi_device); } -void acpi_bus_put_acpi_device (struct acpi_device *adev) -{ -acpi_dev_put (adev); -} -static struct acpi_device_bus_id *acpi_device_bus_id_match (const char *dev_id) {struct acpi_device_bus_id *acpi_device_bus_id;Index:
linux-pm/include/acpi/acpi_bus.h
===================================================================include/acpi/acpi_bus.h +7
-2@@ -504,8 +504,6 @@ extern int unregister_acpi_notifier(stru*/ int acpi_bus_get_device (acpi_handle handle,struct acpi_device **device); -struct acpi_device *acpi_bus_get_acpi_device (acpi_handle handle); -void acpi_bus_put_acpi_device (struct acpi_device *adev);acpi_status acpi_bus_get_status_handle (acpi_handle handle,unsigned long long *sta);int acpi_bus_get_status (struct acpi_device *device);@@ -726,6 +724,13 @@ static inline void acpi_dev_put(struct a {put_device (&adev->dev); } + +struct acpi_device *acpi_bus_get_acpi_device (acpi_handle handle); + +static inline void acpi_bus_put_acpi_device (struct acpi_device *adev) +{ +acpi_dev_put (adev); +}#else /* CONFIG_ACPI */ static inline int register_acpi_bus_type (void *bus) {return 0 ; }
Signature · 2 lines
With Best Regards, Andy Shevchenko