linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI: scan: Define acpi_bus_put_acpi_device() as static inline
Date: Wed, 16 Jun 2021 17:34:15 +0300	[thread overview]
Message-ID: <YMoL5y1DHtGHoeuU@smile.fi.intel.com> (raw)
In-Reply-To: <2086739.irdbgypaU6@kreacher>

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



      reply	other threads:[~2021-06-16 14:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YMoL5y1DHtGHoeuU@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).