public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dlm: use genl_register_family_with_ops()
@ 2010-07-26  9:19 Changli Gao
  2010-07-26 16:04 ` David Teigland
  0 siblings, 1 reply; 2+ messages in thread
From: Changli Gao @ 2010-07-26  9:19 UTC (permalink / raw)
  To: Christine Caulfield
  Cc: David Teigland, cluster-devel, linux-kernel, Changli Gao

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 fs/dlm/netlink.c |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/fs/dlm/netlink.c b/fs/dlm/netlink.c
index 2c6ad51..ef17e01 100644
--- a/fs/dlm/netlink.c
+++ b/fs/dlm/netlink.c
@@ -81,24 +81,11 @@ static struct genl_ops dlm_nl_ops = {
 
 int __init dlm_netlink_init(void)
 {
-	int rv;
-
-	rv = genl_register_family(&family);
-	if (rv)
-		return rv;
-
-	rv = genl_register_ops(&family, &dlm_nl_ops);
-	if (rv < 0)
-		goto err;
-	return 0;
- err:
-	genl_unregister_family(&family);
-	return rv;
+	return genl_register_family_with_ops(&family, &dlm_nl_ops, 1);
 }
 
 void dlm_netlink_exit(void)
 {
-	genl_unregister_ops(&family, &dlm_nl_ops);
 	genl_unregister_family(&family);
 }
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-26 16:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-26  9:19 [PATCH] dlm: use genl_register_family_with_ops() Changli Gao
2010-07-26 16:04 ` David Teigland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox