summaryrefslogtreecommitdiff
path: root/drivers/firmware
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-03-24 16:27:50 +0000
committerGregory CLEMENT <gregory.clement@bootlin.com>2023-04-07 17:17:00 +0200
commitf326e72a6e0baacea42ecaa9aaa4d7e7a355c972 (patch)
tree772fb53fce4161c69b8fbc6e074e54a1741c7df6 /drivers/firmware
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff)
firmware: turris-mox-rwtm: make kobj_type structure 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> Reviewed-by: Marek Behún <kabel@kernel.org> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/turris-mox-rwtm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/turris-mox-rwtm.c b/drivers/firmware/turris-mox-rwtm.c
index 6ea5789a89e2..2de0fb139ce1 100644
--- a/drivers/firmware/turris-mox-rwtm.c
+++ b/drivers/firmware/turris-mox-rwtm.c
@@ -104,7 +104,7 @@ static void mox_kobj_release(struct kobject *kobj)
kfree(to_rwtm(kobj)->kobj);
}
-static struct kobj_type mox_kobj_ktype = {
+static const struct kobj_type mox_kobj_ktype = {
.release = mox_kobj_release,
.sysfs_ops = &kobj_sysfs_ops,
};