summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/rti800.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-05-03 15:09:40 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-09 13:31:36 -0700
commit294f930d98be86fb4f34302c718a49719650857f (patch)
tree1fbb4a6d2f97f9309bab42035934fa1c6807742e /drivers/staging/comedi/drivers/rti800.c
parentfeb5680e063fd39873e9e638937f1197d38a81ca (diff)
staging: comedi: use module_comedi_driver
Convert the refactored comedi drivers to use the module_comedi_driver() macro which makes the code smaller and a bit simpler. In the process, rename the driver variables from driver_* to *_driver, as is more typical with other subsystems, and make sure they are all static. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Mori Hess <fmhess@users.sourceforge.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/drivers/rti800.c')
-rw-r--r--drivers/staging/comedi/drivers/rti800.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c
index 9e082b3f969f..c073bf46f62f 100644
--- a/drivers/staging/comedi/drivers/rti800.c
+++ b/drivers/staging/comedi/drivers/rti800.c
@@ -461,7 +461,7 @@ static const struct rti800_board boardtypes[] = {
{ "rti815", 1 },
};
-static struct comedi_driver driver_rti800 = {
+static struct comedi_driver rti800_driver = {
.driver_name = "rti800",
.module = THIS_MODULE,
.attach = rti800_attach,
@@ -470,18 +470,7 @@ static struct comedi_driver driver_rti800 = {
.board_name = &boardtypes[0].name,
.offset = sizeof(struct rti800_board),
};
-
-static int __init driver_rti800_init_module(void)
-{
- return comedi_driver_register(&driver_rti800);
-}
-module_init(driver_rti800_init_module);
-
-static void __exit driver_rti800_cleanup_module(void)
-{
- comedi_driver_unregister(&driver_rti800);
-}
-module_exit(driver_rti800_cleanup_module);
+module_comedi_driver(rti800_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");