summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorRob Herring (Arm) <robh@kernel.org>2024-10-10 19:27:19 +0300
committerRob Herring (Arm) <robh@kernel.org>2024-10-15 16:58:36 +0300
commit3539089bcc86806d5705f094f46b3dbd61606961 (patch)
tree66dc5d3fff9075c325e399ed15794da5343485ae /drivers/of
parent7118782dfb4ac101b2a9cf1fa7bb95e43d398a9e (diff)
downloadlinux-3539089bcc86806d5705f094f46b3dbd61606961.tar.xz
of: Constify safe_name() kobject arg
The kobject is not modified by safe_name() function, so make it const. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20241010-dt-const-v1-6-87a51f558425@kernel.org Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/kobj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/kobj.c b/drivers/of/kobj.c
index aeb1709d4e85..cab9b169dc67 100644
--- a/drivers/of/kobj.c
+++ b/drivers/of/kobj.c
@@ -37,7 +37,7 @@ static ssize_t of_node_property_read(struct file *filp, struct kobject *kobj,
}
/* always return newly allocated name, caller must free after use */
-static const char *safe_name(struct kobject *kobj, const char *orig_name)
+static const char *safe_name(const struct kobject *kobj, const char *orig_name)
{
const char *name = orig_name;
struct kernfs_node *kn;