summaryrefslogtreecommitdiff
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2009-05-21 10:34:06 +0000
committerDavid S. Miller <davem@davemloft.net>2009-05-21 16:50:25 -0700
commit0d63cbb535a9525445513389370d35b522a700f1 (patch)
tree950d1f35095f5b4c7f041e2138184969c44fd943 /net/wireless/nl80211.c
parent7ae740df3a9c68622156476dca29991de664fae4 (diff)
wireless: 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>
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ade40d503bf0..a3a152f55dd0 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3912,18 +3912,13 @@ nla_put_failure:
int nl80211_init(void)
{
- int err, i;
+ int err;
- err = genl_register_family(&nl80211_fam);
+ err = genl_register_family_with_ops(&nl80211_fam,
+ nl80211_ops, ARRAY_SIZE(nl80211_ops));
if (err)
return err;
- for (i = 0; i < ARRAY_SIZE(nl80211_ops); i++) {
- err = genl_register_ops(&nl80211_fam, &nl80211_ops[i]);
- if (err)
- goto err_out;
- }
-
err = genl_register_mc_group(&nl80211_fam, &nl80211_config_mcgrp);
if (err)
goto err_out;