Commit e8c6cbd7 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Jakub Kicinski

net: bridge: make kobj_type structure constant

Since commit ee6d3dd4 ("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: default avatarThomas Weißschuh <linux@weissschuh.net>
Acked-by: default avatarNikolay Aleksandrov <razor@blackwall.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 56193cf9
...@@ -269,7 +269,7 @@ static void brport_get_ownership(const struct kobject *kobj, kuid_t *uid, kgid_t ...@@ -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); 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 #ifdef CONFIG_SYSFS
.sysfs_ops = &brport_sysfs_ops, .sysfs_ops = &brport_sysfs_ops,
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment