diff options
author | Rob Herring (Arm) <robh@kernel.org> | 2024-10-10 11:27:17 -0500 |
---|---|---|
committer | Rob Herring (Arm) <robh@kernel.org> | 2024-10-15 08:58:36 -0500 |
commit | 9c63fea9acd077701fd67bbc21b1e77d6b98b7e0 (patch) | |
tree | 02e2a8c508426f9e3963c43238798110201485ea /drivers/of/kobj.c | |
parent | ec8c2329da1a8695b3fc80ba67cad9dc75d9a3ec (diff) |
of: Constify struct property pointers
Most accesses to struct property do not modify it, so constify struct
property pointers where ever possible in the DT core code.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20241010-dt-const-v1-4-87a51f558425@kernel.org
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'drivers/of/kobj.c')
-rw-r--r-- | drivers/of/kobj.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/of/kobj.c b/drivers/of/kobj.c index 3dbce1e6f184..aeb1709d4e85 100644 --- a/drivers/of/kobj.c +++ b/drivers/of/kobj.c @@ -84,7 +84,7 @@ int __of_add_property_sysfs(struct device_node *np, struct property *pp) return rc; } -void __of_sysfs_remove_bin_file(struct device_node *np, struct property *prop) +void __of_sysfs_remove_bin_file(struct device_node *np, const struct property *prop) { if (!IS_ENABLED(CONFIG_SYSFS)) return; @@ -93,7 +93,7 @@ void __of_sysfs_remove_bin_file(struct device_node *np, struct property *prop) kfree(prop->attr.attr.name); } -void __of_remove_property_sysfs(struct device_node *np, struct property *prop) +void __of_remove_property_sysfs(struct device_node *np, const struct property *prop) { /* at early boot, bail here and defer setup to of_init() */ if (of_kset && of_node_is_attached(np)) @@ -101,7 +101,7 @@ void __of_remove_property_sysfs(struct device_node *np, struct property *prop) } void __of_update_property_sysfs(struct device_node *np, struct property *newprop, - struct property *oldprop) + const struct property *oldprop) { /* At early boot, bail out and defer setup to of_init() */ if (!of_kset) |