summaryrefslogtreecommitdiff
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorClément Léger <clement.leger@bootlin.com>2022-06-01 10:17:58 +0200
committerRob Herring <robh@kernel.org>2022-06-06 12:41:25 -0500
commit39d649602be2ceb3f8f8e98483d09e4d71133c6a (patch)
tree79a6e019779e2a6399e16e286fa82b4929f8eeba /include/linux/of.h
parentf2906aa863381afb0015a9eb7fefad885d4e5a56 (diff)
of: constify of_property_check_flags() prop argument
This argument is not modified and thus can be set as const. Signed-off-by: Clément Léger <clement.leger@bootlin.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220601081801.348571-2-clement.leger@bootlin.com
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index f0a5d6b10c5a..d74fd82a6963 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -207,7 +207,7 @@ static inline void of_node_clear_flag(struct device_node *n, unsigned long flag)
}
#if defined(CONFIG_OF_DYNAMIC) || defined(CONFIG_SPARC)
-static inline int of_property_check_flag(struct property *p, unsigned long flag)
+static inline int of_property_check_flag(const struct property *p, unsigned long flag)
{
return test_bit(flag, &p->_flags);
}
@@ -814,7 +814,8 @@ static inline void of_node_clear_flag(struct device_node *n, unsigned long flag)
{
}
-static inline int of_property_check_flag(struct property *p, unsigned long flag)
+static inline int of_property_check_flag(const struct property *p,
+ unsigned long flag)
{
return 0;
}