Search Linux Wireless

[PATCH 6/6 2.6.30-rc6] wireless: Use genl_register_family_with_ops()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use genl_register_family_with_ops() instead of a copy.

Signed-off-by: MichaÅ? MirosÅ?aw <mirq-linux@xxxxxxxxxxxx>

diff -urN linux-orig-mqbr/net/wireless/nl80211.c linux-mqbr/net/wireless/nl80211.c
--- linux-orig-mqbr/net/wireless/nl80211.c	2009-03-24 00:12:14.000000000 +0100
+++ linux-mqbr/net/wireless/nl80211.c	2009-05-21 17:51:34.000000000 +0200
@@ -3395,18 +3395,13 @@
 
 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux