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>,
Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH v1] ACPI: property: Use acpi_dev_parent()
Date: Mon, 29 Aug 2022 20:00:01 +0300 [thread overview]
Message-ID: <YwzwkdAZwNTBQ3gh@smile.fi.intel.com> (raw)
In-Reply-To: <4756666.GXAFRqVoOG@kreacher>
On Mon, Aug 29, 2022 at 06:12:33PM +0200, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> After introducing acpi_dev_parent() in commit 62fcb99bdf10 ("ACPI: Drop
> parent field from struct acpi_device"), it is better to use it instead
> of accessing the dev.parent field in struct acpi_device directly.
>
> Modify acpi_node_get_parent() accordingly.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Thanks!
> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> drivers/acpi/property.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> Index: linux-pm/drivers/acpi/property.c
> ===================================================================
> --- linux-pm.orig/drivers/acpi/property.c
> +++ linux-pm/drivers/acpi/property.c
> @@ -1269,10 +1269,11 @@ acpi_node_get_parent(const struct fwnode
> return to_acpi_data_node(fwnode)->parent;
> }
> if (is_acpi_device_node(fwnode)) {
> - struct device *dev = to_acpi_device_node(fwnode)->dev.parent;
> + struct acpi_device *parent;
>
> - if (dev)
> - return acpi_fwnode_handle(to_acpi_device(dev));
> + parent = acpi_dev_parent(to_acpi_device_node(fwnode));
> + if (parent)
> + return acpi_fwnode_handle(parent);
> }
>
> return NULL;
>
>
>
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2022-08-29 17:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 16:12 [PATCH v1] ACPI: property: Use acpi_dev_parent() Rafael J. Wysocki
2022-08-29 17:00 ` 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=YwzwkdAZwNTBQ3gh@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@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