aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/poc.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/poc.c
parentstaging: rts5139: Fix typo in rts5139 (diff)
downloadlinux-dev-294f930d98be86fb4f34302c718a49719650857f.tar.xz
linux-dev-294f930d98be86fb4f34302c718a49719650857f.zip
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/poc.c')
-rw-r--r--drivers/staging/comedi/drivers/poc.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c
index e3690bbd201a..2e50c7fd7882 100644
--- a/drivers/staging/comedi/drivers/poc.c
+++ b/drivers/staging/comedi/drivers/poc.c
@@ -222,7 +222,7 @@ static const struct boarddef_struct boards[] = {
},
};
-static struct comedi_driver driver_poc = {
+static struct comedi_driver poc_driver = {
.driver_name = "poc",
.module = THIS_MODULE,
.attach = poc_attach,
@@ -231,18 +231,7 @@ static struct comedi_driver driver_poc = {
.num_names = ARRAY_SIZE(boards),
.offset = sizeof(boards[0]),
};
-
-static int __init driver_poc_init_module(void)
-{
- return comedi_driver_register(&driver_poc);
-}
-module_init(driver_poc_init_module);
-
-static void __exit driver_poc_cleanup_module(void)
-{
- comedi_driver_unregister(&driver_poc);
-}
-module_exit(driver_poc_cleanup_module);
+module_comedi_driver(poc_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");