]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/hsr/hsr_netlink.c
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
[mirror_ubuntu-artful-kernel.git] / net / hsr / hsr_netlink.c
index d4d1617f43a8bfb842a8017dc51655ae1065942b..1ab30e7d3f99e19c5e54fd9747cfce7a5c1f559b 100644 (file)
@@ -131,13 +131,7 @@ static const struct nla_policy hsr_genl_policy[HSR_A_MAX + 1] = {
        [HSR_A_IF2_SEQ] = { .type = NLA_U16 },
 };
 
-static struct genl_family hsr_genl_family = {
-       .id = GENL_ID_GENERATE,
-       .hdrsize = 0,
-       .name = "HSR",
-       .version = 1,
-       .maxattr = HSR_A_MAX,
-};
+static struct genl_family hsr_genl_family;
 
 static const struct genl_multicast_group hsr_mcgrps[] = {
        { .name = "hsr-network", },
@@ -467,6 +461,18 @@ static const struct genl_ops hsr_ops[] = {
        },
 };
 
+static struct genl_family hsr_genl_family __ro_after_init = {
+       .hdrsize = 0,
+       .name = "HSR",
+       .version = 1,
+       .maxattr = HSR_A_MAX,
+       .module = THIS_MODULE,
+       .ops = hsr_ops,
+       .n_ops = ARRAY_SIZE(hsr_ops),
+       .mcgrps = hsr_mcgrps,
+       .n_mcgrps = ARRAY_SIZE(hsr_mcgrps),
+};
+
 int __init hsr_netlink_init(void)
 {
        int rc;
@@ -475,8 +481,7 @@ int __init hsr_netlink_init(void)
        if (rc)
                goto fail_rtnl_link_register;
 
-       rc = genl_register_family_with_ops_groups(&hsr_genl_family, hsr_ops,
-                                                 hsr_mcgrps);
+       rc = genl_register_family(&hsr_genl_family);
        if (rc)
                goto fail_genl_register_family;