summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/rti802.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/rti802.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/rti802.c')
-rw-r--r--drivers/staging/comedi/drivers/rti802.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/staging/comedi/drivers/rti802.c b/drivers/staging/comedi/drivers/rti802.c
index 21baf1a1c405..b4980b41596f 100644
--- a/drivers/staging/comedi/drivers/rti802.c
+++ b/drivers/staging/comedi/drivers/rti802.c
@@ -139,24 +139,13 @@ static int rti802_detach(struct comedi_device *dev)
return 0;
}
-static struct comedi_driver driver_rti802 = {
+static struct comedi_driver rti802_driver = {
.driver_name = "rti802",
.module = THIS_MODULE,
.attach = rti802_attach,
.detach = rti802_detach,
};
-
-static int __init driver_rti802_init_module(void)
-{
- return comedi_driver_register(&driver_rti802);
-}
-module_init(driver_rti802_init_module);
-
-static void __exit driver_rti802_cleanup_module(void)
-{
- comedi_driver_unregister(&driver_rti802);
-}
-module_exit(driver_rti802_cleanup_module);
+module_comedi_driver(rti802_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");