aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless
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
parent7ae740df3a9c68622156476dca29991de664fae4 (diff)
downloadkernel_samsung_smdk4412-0d63cbb535a9525445513389370d35b522a700f1.zip
kernel_samsung_smdk4412-0d63cbb535a9525445513389370d35b522a700f1.tar.gz
kernel_samsung_smdk4412-0d63cbb535a9525445513389370d35b522a700f1.tar.bz2
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')
-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 ade40d5..a3a152f 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;