Skip to content

Commit 3539089

Browse files
committed
of: Constify safe_name() kobject arg
The kobject is not modified by safe_name() function, so make it const. Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 7118782 commit 3539089

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/of/kobj.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static ssize_t of_node_property_read(struct file *filp, struct kobject *kobj,
3737
}
3838

3939
/* always return newly allocated name, caller must free after use */
40-
static const char *safe_name(struct kobject *kobj, const char *orig_name)
40+
static const char *safe_name(const struct kobject *kobj, const char *orig_name)
4141
{
4242
const char *name = orig_name;
4343
struct kernfs_node *kn;

0 commit comments

Comments
 (0)