wireless: Use genl_register_family_with_ops()
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Thu, 21 May 2009 10:34:06 +0000 (10:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 May 2009 23:50:25 +0000 (16:50 -0700)
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>
net/wireless/nl80211.c

index ade40d503bf01ae400539fe57d7a396aa2eb3342..a3a152f55dd04401318d67ec876e585c6f8f7805 100644 (file)
@@ -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;