mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
irda: Use genl_register_family_with_ops()
Use genl_register_family_with_ops() instead of a copy. Signed-off-by: Michał Mirosław <[email protected]> Cc: Samuel Ortiz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
a7b11d7382
commit
502664eeaf
1 changed files with 2 additions and 15 deletions
|
|
@ -148,21 +148,8 @@ static struct genl_ops irda_nl_ops[] = {
|
|||
|
||||
int irda_nl_register(void)
|
||||
{
|
||||
int err, i;
|
||||
|
||||
err = genl_register_family(&irda_nl_family);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(irda_nl_ops); i++) {
|
||||
err = genl_register_ops(&irda_nl_family, &irda_nl_ops[i]);
|
||||
if (err)
|
||||
goto err_out;
|
||||
}
|
||||
return 0;
|
||||
err_out:
|
||||
genl_unregister_family(&irda_nl_family);
|
||||
return err;
|
||||
return genl_register_family_with_ops(&irda_nl_family,
|
||||
irda_nl_ops, ARRAY_SIZE(irda_nl_ops));
|
||||
}
|
||||
|
||||
void irda_nl_unregister(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue