[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3-1000-10527-1242938044-3360@rere.qmqm.pl>
Date: Thu, 21 May 2009 22:34:05 +0200 (CEST)
From: Michał Mirosław
<mirq-linux@...e.qmqm.pl>
To: netdev@...r.kernel.org
Subject: [PATCH 3/6 2.6.30-rc6] ipvs: Use genl_register_family_with_ops()
Use genl_register_family_with_ops() instead of a copy.
Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
diff -urN linux-orig-mqbr/net/netfilter/ipvs/ip_vs_ctl.c linux-mqbr/net/netfilter/ipvs/ip_vs_ctl.c
--- linux-orig-mqbr/net/netfilter/ipvs/ip_vs_ctl.c 2009-03-24 00:12:14.000000000 +0100
+++ linux-mqbr/net/netfilter/ipvs/ip_vs_ctl.c 2009-05-21 17:54:36.000000000 +0200
@@ -3345,22 +3345,8 @@
static int __init ip_vs_genl_register(void)
{
- int ret, i;
-
- 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;
+ return genl_register_family_with_ops(&ip_vs_genl_family,
+ ip_vs_genl_ops, ARRAY_SIZE(ip_vs_genl_ops));
}
static void ip_vs_genl_unregister(void)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists