Skip to content

Commit

Permalink
staging: comedi: skel: use module_comedi_driver to simplify the code
Browse files Browse the repository at this point in the history
Use the module_comedi_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Oct 26, 2012
1 parent 3d56802 commit ea86909
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/staging/comedi/drivers/skel.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,18 +628,7 @@ static void __exit driver_skel_cleanup_module(void)
module_init(driver_skel_init_module);
module_exit(driver_skel_cleanup_module);
#else
static int __init driver_skel_init_module(void)
{
return comedi_driver_register(&driver_skel);
}

static void __exit driver_skel_cleanup_module(void)
{
comedi_driver_unregister(&driver_skel);
}

module_init(driver_skel_init_module);
module_exit(driver_skel_cleanup_module);
module_comedi_driver(driver_skel);
#endif

MODULE_AUTHOR("Comedi http://www.comedi.org");
Expand Down

0 comments on commit ea86909

Please sign in to comment.