Skip to content

Commit

Permalink
staging: comedi: 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 c665814 commit 3d56802
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions drivers/staging/comedi/drivers/das800.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,22 +342,7 @@ static int das800_probe(struct comedi_device *dev)
return -1;
}

/*
* A convenient macro that defines init_module() and cleanup_module(),
* as necessary.
*/
static int __init driver_das800_init_module(void)
{
return comedi_driver_register(&driver_das800);
}

static void __exit driver_das800_cleanup_module(void)
{
comedi_driver_unregister(&driver_das800);
}

module_init(driver_das800_init_module);
module_exit(driver_das800_cleanup_module);
module_comedi_driver(driver_das800);

/* interrupt service routine */
static irqreturn_t das800_interrupt(int irq, void *d)
Expand Down

0 comments on commit 3d56802

Please sign in to comment.