From 0d63cbb535a9525445513389370d35b522a700f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Date: Thu, 21 May 2009 10:34:06 +0000 Subject: wireless: Use genl_register_family_with_ops() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use genl_register_family_with_ops() instead of a copy. Signed-off-by: Michał Mirosław Signed-off-by: David S. Miller --- net/wireless/nl80211.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'net/wireless') 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; -- cgit v1.1