diff options
| author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2009-05-21 06:34:05 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2009-05-21 19:50:24 -0400 |
| commit | 8f698d54532172de3591af1e9394dc669f29e6ca (patch) | |
| tree | 38c56eca00be0de5bfb43bad466f0ee95ff041bf | |
| parent | acb0a200ae48d95e3117608d0225a23e5efa283c (diff) | |
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@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index e01061f49cdc..7c1333c67ff3 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
| @@ -3345,22 +3345,8 @@ static struct genl_ops ip_vs_genl_ops[] __read_mostly = { | |||
| 3345 | 3345 | ||
| 3346 | static int __init ip_vs_genl_register(void) | 3346 | static int __init ip_vs_genl_register(void) |
| 3347 | { | 3347 | { |
| 3348 | int ret, i; | 3348 | return genl_register_family_with_ops(&ip_vs_genl_family, |
| 3349 | 3349 | ip_vs_genl_ops, ARRAY_SIZE(ip_vs_genl_ops)); | |
| 3350 | ret = genl_register_family(&ip_vs_genl_family); | ||
| 3351 | if (ret) | ||
| 3352 | return ret; | ||
| 3353 | |||
| 3354 | for (i = 0; i < ARRAY_SIZE(ip_vs_genl_ops); i++) { | ||
| 3355 | ret = genl_register_ops(&ip_vs_genl_family, &ip_vs_genl_ops[i]); | ||
| 3356 | if (ret) | ||
| 3357 | goto err_out; | ||
| 3358 | } | ||
| 3359 | return 0; | ||
| 3360 | |||
| 3361 | err_out: | ||
| 3362 | genl_unregister_family(&ip_vs_genl_family); | ||
| 3363 | return ret; | ||
| 3364 | } | 3350 | } |
| 3365 | 3351 | ||
| 3366 | static void ip_vs_genl_unregister(void) | 3352 | static void ip_vs_genl_unregister(void) |
