summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-04 08:47:03 +0300
committerRob Herring <robh@kernel.org>2023-02-06 20:03:00 +0300
commit20f6d4f2a474fc2dc502358dcee3c9b18304ec1e (patch)
tree74c345a22d734f1f82197f3d89e2361b7e08882c /drivers/of
parentdf4fdd0db4756f8d08285e4a93fa40056aefefbe (diff)
downloadlinux-20f6d4f2a474fc2dc502358dcee3c9b18304ec1e.tar.xz
of: make of_node_ktype constant
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20230204-kobj_type-of-v1-1-5910c8ecb7a3@weissschuh.net Signed-off-by: Rob Herring <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 7d3853a5a09a..3dbce1e6f184 100644
--- a/drivers/of/kobj.c
+++ b/drivers/of/kobj.c
@@ -24,7 +24,7 @@ static void of_node_release(struct kobject *kobj)
}
#endif /* CONFIG_OF_DYNAMIC */
-struct kobj_type of_node_ktype = {
+const struct kobj_type of_node_ktype = {
.release = of_node_release,
};