dlm: use genl_register_family_with_ops()

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
Changli Gao 2010-07-26 17:19:19 +08:00 committed by David Teigland
parent cdd854bc42
commit a4d935bd97
1 changed files with 1 additions and 14 deletions

View File

@ -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);
}