linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: scan: Define acpi_bus_put_acpi_device() as static inline
@ 2021-06-16 14:06 Rafael J. Wysocki
  2021-06-16 14:34 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-06-16 14:06 UTC (permalink / raw)
  To: Linux ACPI; +Cc: LKML, Andy Shevchenko

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(-)

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; }




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: scan: Define acpi_bus_put_acpi_device() as static inline
  2021-06-16 14:06 [PATCH] ACPI: scan: Define acpi_bus_put_acpi_device() as static inline Rafael J. Wysocki
@ 2021-06-16 14:34 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2021-06-16 14:34 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Linux ACPI, LKML

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; }
> 
> 
> 

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-16 14:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 14:06 [PATCH] ACPI: scan: Define acpi_bus_put_acpi_device() as static inline Rafael J. Wysocki
2021-06-16 14:34 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).