Commit 8f698d54 authored by Michał Mirosław's avatar Michał Mirosław Committed by David S. Miller

ipvs: Use genl_register_family_with_ops()

Use genl_register_family_with_ops() instead of a copy.
Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent acb0a200
...@@ -3345,22 +3345,8 @@ static struct genl_ops ip_vs_genl_ops[] __read_mostly = { ...@@ -3345,22 +3345,8 @@ static struct genl_ops ip_vs_genl_ops[] __read_mostly = {
static int __init ip_vs_genl_register(void) static int __init ip_vs_genl_register(void)
{ {
int ret, i; return genl_register_family_with_ops(&ip_vs_genl_family,
ip_vs_genl_ops, ARRAY_SIZE(ip_vs_genl_ops));
ret = genl_register_family(&ip_vs_genl_family);
if (ret)
return ret;
for (i = 0; i < ARRAY_SIZE(ip_vs_genl_ops); i++) {
ret = genl_register_ops(&ip_vs_genl_family, &ip_vs_genl_ops[i]);
if (ret)
goto err_out;
}
return 0;
err_out:
genl_unregister_family(&ip_vs_genl_family);
return ret;
} }
static void ip_vs_genl_unregister(void) static void ip_vs_genl_unregister(void)
......
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