From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-acpi@vger.kernel.org
Cc: John Ogness <john.ogness@linutronix.de>,
rafael@kernel.org, mika.westerberg@linux.intel.com,
Petr Mladek <pmladek@suse.com>,
Andy Shevchenko <andriy.shevchenko@intel.com>
Subject: [PATCH 2/2] ACPI: Make acpi_node_get_parent() local
Date: Tue, 9 Nov 2021 13:19:35 +0200 [thread overview]
Message-ID: <20211109111935.1627406-3-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20211109111935.1627406-1-sakari.ailus@linux.intel.com>
acpi_node_get_parent() isn't used outside drivers/acpi/property.c. Make it
local.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
---
drivers/acpi/property.c | 6 +++---
include/linux/acpi.h | 7 -------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index dc97711ba8081..ea82e5e2fdbce 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -1084,7 +1084,8 @@ struct fwnode_handle *acpi_get_next_subnode(const struct fwnode_handle *fwnode,
* Returns parent node of an ACPI device or data firmware node or %NULL if
* not available.
*/
-struct fwnode_handle *acpi_node_get_parent(const struct fwnode_handle *fwnode)
+static struct fwnode_handle *
+acpi_node_get_parent(const struct fwnode_handle *fwnode)
{
if (is_acpi_data_node(fwnode)) {
/* All data nodes have parent pointer so just return that */
@@ -1092,8 +1093,7 @@ struct fwnode_handle *acpi_node_get_parent(const struct fwnode_handle *fwnode)
}
if (is_acpi_device_node(fwnode)) {
- struct device *dev =
- to_acpi_device_node(fwnode)->dev.parent;
+ struct device *dev = to_acpi_device_node(fwnode)->dev.parent;
if (dev)
return acpi_fwnode_handle(to_acpi_device(dev));
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 974d497a897dc..a8e84be083a26 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -1170,7 +1170,6 @@ int acpi_node_prop_get(const struct fwnode_handle *fwnode, const char *propname,
struct fwnode_handle *acpi_get_next_subnode(const struct fwnode_handle *fwnode,
struct fwnode_handle *child);
-struct fwnode_handle *acpi_node_get_parent(const struct fwnode_handle *fwnode);
struct acpi_probe_entry;
typedef bool (*acpi_probe_entry_validate_subtbl)(struct acpi_subtable_header *,
@@ -1275,12 +1274,6 @@ acpi_get_next_subnode(const struct fwnode_handle *fwnode,
return NULL;
}
-static inline struct fwnode_handle *
-acpi_node_get_parent(const struct fwnode_handle *fwnode)
-{
- return NULL;
-}
-
static inline struct fwnode_handle *
acpi_graph_get_next_endpoint(const struct fwnode_handle *fwnode,
struct fwnode_handle *prev)
--
2.30.2
next prev parent reply other threads:[~2021-11-09 11:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 11:19 [PATCH 0/2] Get device's parent from parent field, fix sleeping IRQs disabled Sakari Ailus
2021-11-09 11:19 ` [PATCH 1/2] ACPI: Get acpi_device's parent from the parent field Sakari Ailus
2021-11-09 12:19 ` Andy Shevchenko
2021-11-10 8:09 ` Sakari Ailus
2021-11-10 8:18 ` Andy Shevchenko
2021-11-10 8:21 ` Sakari Ailus
2021-11-10 8:56 ` Andy Shevchenko
2021-11-10 12:02 ` Sakari Ailus
2021-11-10 13:12 ` Andy Shevchenko
2021-11-17 14:52 ` Rafael J. Wysocki
2021-11-17 16:46 ` Sakari Ailus
2021-11-09 11:19 ` Sakari Ailus [this message]
2021-11-09 12:20 ` [PATCH 2/2] ACPI: Make acpi_node_get_parent() local Andy Shevchenko
2021-11-10 8:06 ` Sakari Ailus
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=20211109111935.1627406-3-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=andriy.shevchenko@intel.com \
--cc=john.ogness@linutronix.de \
--cc=linux-acpi@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=pmladek@suse.com \
--cc=rafael@kernel.org \
/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