From: Heiner Kallweit Date: Fri, 12 Apr 2024 10:17:57 +0000 (+0200) Subject: net: constify net_class X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9382b4f338d261494aad7eeffef0b13ff663b542;p=linux.git net: constify net_class AFAICS all users of net_class take a const struct class * argument. Therefore fully constify net_class. Signed-off-by: Heiner Kallweit Acked-by: Stephen Hemminger Signed-off-by: David S. Miller --- diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index ff3ee45be64a6..1f7f09e567715 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -2046,7 +2046,7 @@ static void net_get_ownership(const struct device *d, kuid_t *uid, kgid_t *gid) net_ns_get_ownership(net, uid, gid); } -static struct class net_class __ro_after_init = { +static const struct class net_class = { .name = "net", .dev_release = netdev_release, .dev_groups = net_class_groups,