Skip to content

Commit

Permalink
use module_init()/module_exit() rather than '#ifdef MODULE'
Browse files Browse the repository at this point in the history
  • Loading branch information
umlaeute committed Jan 27, 2021
1 parent a5e5b20 commit 1fcd767
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions v4l2loopback.c
Original file line number Diff line number Diff line change
Expand Up @@ -2877,18 +2877,8 @@ static void v4l2loopback_cleanup_module(void)
MODULE_ALIAS_MISCDEV(MISC_DYNAMIC_MINOR);
MODULE_ALIAS("devname:v4l2loopback");

#ifdef MODULE
int __init init_module(void)
{
return v4l2loopback_init_module();
}
void __exit cleanup_module(void)
{
return v4l2loopback_cleanup_module();
}
#else
late_initcall(v4l2loopback_init_module);
#endif
module_init(v4l2loopback_init_module);
module_exit(v4l2loopback_cleanup_module);

/*
* fake usage of unused functions
Expand Down

0 comments on commit 1fcd767

Please sign in to comment.