summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-14 04:23:11 +0000
committerJakub Kicinski <kuba@kernel.org>2023-02-14 20:48:08 -0800
commite8c6cbd7656e4cea9e2336a3a85bd609dd76eb3d (patch)
tree8764b5c897fffe2bcb6ef574a14f98d5ba01fbf1 /net/bridge
parent56193cf96f00e9ae4fc95d31c9725c3642ef1e99 (diff)
downloadlinux-e8c6cbd7656e4cea9e2336a3a85bd609dd76eb3d.tar.gz
linux-e8c6cbd7656e4cea9e2336a3a85bd609dd76eb3d.tar.bz2
linux-e8c6cbd7656e4cea9e2336a3a85bd609dd76eb3d.zip
net: bridge: 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> Acked-by: Nikolay Aleksandrov <razor@blackwall.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_if.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index ad13b48e3e08..24f01ff113f0 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -269,7 +269,7 @@ static void brport_get_ownership(const struct kobject *kobj, kuid_t *uid, kgid_t
net_ns_get_ownership(dev_net(p->dev), uid, gid);
}
-static struct kobj_type brport_ktype = {
+static const struct kobj_type brport_ktype = {
#ifdef CONFIG_SYSFS
.sysfs_ops = &brport_sysfs_ops,
#endif