summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-06-16 17:06:52 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-06-17 16:54:25 +0300
commit2d0795148a5a7dd33999daf600eb6fdeffabd6ba (patch)
tree275ed1b64cfdc5fda2af27a0e9b2a8f6a4ecc3c0
parent23db673d7e5194c8fbbb8c307e23960767305c09 (diff)
downloadlinux-2d0795148a5a7dd33999daf600eb6fdeffabd6ba.tar.xz
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 <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-rw-r--r--drivers/acpi/scan.c5
-rw-r--r--include/acpi/acpi_bus.h9
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f64119a17382..75b6bbc717b0 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -606,11 +606,6 @@ struct acpi_device *acpi_bus_get_acpi_device(acpi_handle handle)
return 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;
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 4bed30e61c5b..d8e7235b4cf0 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -504,8 +504,6 @@ extern int unregister_acpi_notifier(struct notifier_block *);
*/
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 acpi_device *adev)
{
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; }