diff mbox series

ACPI: scan: Define acpi_bus_put_acpi_device() as static inline

Message ID 2086739.irdbgypaU6@kreacher (mailing list archive)
State Mainlined, archived
Headers show
Series ACPI: scan: Define acpi_bus_put_acpi_device() as static inline | expand

Commit Message

Rafael J. Wysocki June 16, 2021, 2:06 p.m. UTC
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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>
---
 drivers/acpi/scan.c     |    5 -----
 include/acpi/acpi_bus.h |    9 +++++++--
 2 files changed, 7 insertions(+), 7 deletions(-)

Comments

Andy Shevchenko June 16, 2021, 2:34 p.m. UTC | #1
On Wed, Jun 16, 2021 at 04:06:52PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> 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.

No objections, thanks!
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  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
> ===================================================================
> --- linux-pm.orig/drivers/acpi/scan.c
> +++ linux-pm/drivers/acpi/scan.c
> @@ -608,11 +608,6 @@ struct acpi_device *acpi_bus_get_acpi_de
>  	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;
> Index: linux-pm/include/acpi/acpi_bus.h
> ===================================================================
> --- linux-pm.orig/include/acpi/acpi_bus.h
> +++ linux-pm/include/acpi/acpi_bus.h
> @@ -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; }
> 
> 
>
diff mbox series

Patch

Index: linux-pm/drivers/acpi/scan.c
===================================================================
--- linux-pm.orig/drivers/acpi/scan.c
+++ linux-pm/drivers/acpi/scan.c
@@ -608,11 +608,6 @@  struct acpi_device *acpi_bus_get_acpi_de
 	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;
Index: linux-pm/include/acpi/acpi_bus.h
===================================================================
--- linux-pm.orig/include/acpi/acpi_bus.h
+++ linux-pm/include/acpi/acpi_bus.h
@@ -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; }