aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/kobj.c
diff options
context:
space:
mode:
authorNathan Lynch <nathanl@linux.ibm.com>2021-10-14 12:30:23 -0500
committerRob Herring <robh@kernel.org>2021-10-20 13:37:25 -0500
commit6effc8857b24350cb7534cb1029ade9a8573e04a (patch)
tree9a45cea34da5e5ac3cb5fa619855f5658d47c13f /drivers/of/kobj.c
parentx86: dt: Use of_get_cpu_hwid() (diff)
downloadlinux-dev-6effc8857b24350cb7534cb1029ade9a8573e04a.tar.xz
linux-dev-6effc8857b24350cb7534cb1029ade9a8573e04a.zip
of: kobj: make of_node_is_(initialized|attached) parameters const
of_node_is_initialized() and of_node_is_attached() don't modify the node objects passed to them, so those parameters should be const. Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com> Link: https://lore.kernel.org/r/20211014173023.2117799-1-nathanl@linux.ibm.com Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of/kobj.c')
-rw-r--r--drivers/of/kobj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/kobj.c b/drivers/of/kobj.c
index 6675b5e56960..7d3853a5a09a 100644
--- a/drivers/of/kobj.c
+++ b/drivers/of/kobj.c
@@ -5,13 +5,13 @@
#include "of_private.h"
/* true when node is initialized */
-static int of_node_is_initialized(struct device_node *node)
+static int of_node_is_initialized(const struct device_node *node)
{
return node && node->kobj.state_initialized;
}
/* true when node is attached (i.e. present on sysfs) */
-int of_node_is_attached(struct device_node *node)
+int of_node_is_attached(const struct device_node *node)
{
return node && node->kobj.state_in_sysfs;
}