Skip to content

Commit 2d07951

Browse files
committed
ACPI: scan: Define acpi_bus_put_acpi_device() as static inline
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]> Reviewed-by: Andy Shevchenko <[email protected]>
1 parent 23db673 commit 2d07951

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

drivers/acpi/scan.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -606,11 +606,6 @@ struct acpi_device *acpi_bus_get_acpi_device(acpi_handle handle)
606606
return handle_to_device(handle, get_acpi_device);
607607
}
608608

609-
void acpi_bus_put_acpi_device(struct acpi_device *adev)
610-
{
611-
acpi_dev_put(adev);
612-
}
613-
614609
static struct acpi_device_bus_id *acpi_device_bus_id_match(const char *dev_id)
615610
{
616611
struct acpi_device_bus_id *acpi_device_bus_id;

include/acpi/acpi_bus.h

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,6 @@ extern int unregister_acpi_notifier(struct notifier_block *);
504504
*/
505505

506506
int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device);
507-
struct acpi_device *acpi_bus_get_acpi_device(acpi_handle handle);
508-
void acpi_bus_put_acpi_device(struct acpi_device *adev);
509507
acpi_status acpi_bus_get_status_handle(acpi_handle handle,
510508
unsigned long long *sta);
511509
int acpi_bus_get_status(struct acpi_device *device);
@@ -726,6 +724,13 @@ static inline void acpi_dev_put(struct acpi_device *adev)
726724
{
727725
put_device(&adev->dev);
728726
}
727+
728+
struct acpi_device *acpi_bus_get_acpi_device(acpi_handle handle);
729+
730+
static inline void acpi_bus_put_acpi_device(struct acpi_device *adev)
731+
{
732+
acpi_dev_put(adev);
733+
}
729734
#else /* CONFIG_ACPI */
730735

731736
static inline int register_acpi_bus_type(void *bus) { return 0; }

0 commit comments

Comments
 (0)