]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/irda/irnetlink.c
Merge tag 'drm-for-v4.10' of git://people.freedesktop.org/~airlied/linux
[mirror_ubuntu-artful-kernel.git] / net / irda / irnetlink.c
index e15c40e86660cf204cc1bc734abde164fb3ef22e..7fc340e574cf3b1e5484cbcbabe3a1e33be582b4 100644 (file)
 
 
 
-static struct genl_family irda_nl_family = {
-       .id = GENL_ID_GENERATE,
-       .name = IRDA_NL_NAME,
-       .hdrsize = 0,
-       .version = IRDA_NL_VERSION,
-       .maxattr = IRDA_NL_CMD_MAX,
-};
+static struct genl_family irda_nl_family;
 
 static struct net_device * ifname_to_netdev(struct net *net, struct genl_info *info)
 {
@@ -147,9 +141,19 @@ static const struct genl_ops irda_nl_ops[] = {
 
 };
 
-int irda_nl_register(void)
+static struct genl_family irda_nl_family __ro_after_init = {
+       .name = IRDA_NL_NAME,
+       .hdrsize = 0,
+       .version = IRDA_NL_VERSION,
+       .maxattr = IRDA_NL_CMD_MAX,
+       .module = THIS_MODULE,
+       .ops = irda_nl_ops,
+       .n_ops = ARRAY_SIZE(irda_nl_ops),
+};
+
+int __init irda_nl_register(void)
 {
-       return genl_register_family_with_ops(&irda_nl_family, irda_nl_ops);
+       return genl_register_family(&irda_nl_family);
 }
 
 void irda_nl_unregister(void)