Commit 652c6717465dbd0091dbe04ed9be2f7e59c03c7d

Authored by Changli Gao
Committed by David S. Miller
1 parent a256be70c5

genetlink: use genl_register_family_with_ops()

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 5 deletions Side-by-side Diff

net/netlink/genetlink.c
... ... @@ -877,11 +877,7 @@
877 877 for (i = 0; i < GENL_FAM_TAB_SIZE; i++)
878 878 INIT_LIST_HEAD(&family_ht[i]);
879 879  
880   - err = genl_register_family(&genl_ctrl);
881   - if (err < 0)
882   - goto problem;
883   -
884   - err = genl_register_ops(&genl_ctrl, &genl_ctrl_ops);
  880 + err = genl_register_family_with_ops(&genl_ctrl, &genl_ctrl_ops, 1);
885 881 if (err < 0)
886 882 goto problem;
887 883