Skip to content

Commit f326e72

Browse files
t-8chgclement
authored andcommitted
firmware: turris-mox-rwtm: make kobj_type structure constant
Since commit ee6d3dd ("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> Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
1 parent fe15c26 commit f326e72

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/firmware/turris-mox-rwtm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static void mox_kobj_release(struct kobject *kobj)
104104
kfree(to_rwtm(kobj)->kobj);
105105
}
106106

107-
static struct kobj_type mox_kobj_ktype = {
107+
static const struct kobj_type mox_kobj_ktype = {
108108
.release = mox_kobj_release,
109109
.sysfs_ops = &kobj_sysfs_ops,
110110
};

0 commit comments

Comments
 (0)