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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Michał Mirosław
Date: Thursday, May 21, 2009 - 1:34 pm

Use genl_register_family_with_ops() instead of a copy.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>

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 netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/6 2.6.30-rc6] irda: Use genl_register_family_with ..., Michał Mirosław , (Thu May 21, 1:34 pm)
[PATCH 1/6 2.6.30-rc6] genetlink: Introduce genl_register_ ..., Michał Mirosław , (Thu May 21, 1:34 pm)
[PATCH 5/6 2.6.30-rc6] tipc: Use genl_register_family_with ..., Michał Mirosław , (Thu May 21, 1:34 pm)
[PATCH 4/6 2.6.30-rc6] netlabel: Use genl_register_family_ ..., Michał Mirosław , (Thu May 21, 1:34 pm)
[PATCH 3/6 2.6.30-rc6] ipvs: Use genl_register_family_with ..., Michał Mirosław , (Thu May 21, 1:34 pm)
[PATCH 6/6 2.6.30-rc6] wireless: Use genl_register_family_ ..., Michał Mirosław , (Thu May 21, 1:34 pm)