diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-05-03 15:09:40 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-09 13:31:36 -0700 |
commit | 294f930d98be86fb4f34302c718a49719650857f (patch) | |
tree | 1fbb4a6d2f97f9309bab42035934fa1c6807742e /drivers/staging/comedi/drivers/pcl730.c | |
parent | feb5680e063fd39873e9e638937f1197d38a81ca (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/pcl730.c')
-rw-r--r-- | drivers/staging/comedi/drivers/pcl730.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/staging/comedi/drivers/pcl730.c b/drivers/staging/comedi/drivers/pcl730.c index f6fa8aeab918..73b4394fe478 100644 --- a/drivers/staging/comedi/drivers/pcl730.c +++ b/drivers/staging/comedi/drivers/pcl730.c @@ -150,7 +150,7 @@ static const struct pcl730_board boardtypes[] = { { "acl7130", ACL7130_SIZE, }, }; -static struct comedi_driver driver_pcl730 = { +static struct comedi_driver pcl730_driver = { .driver_name = "pcl730", .module = THIS_MODULE, .attach = pcl730_attach, @@ -159,18 +159,7 @@ static struct comedi_driver driver_pcl730 = { .num_names = ARRAY_SIZE(boardtypes), .offset = sizeof(struct pcl730_board), }; - -static int __init driver_pcl730_init_module(void) -{ - return comedi_driver_register(&driver_pcl730); -} -module_init(driver_pcl730_init_module); - -static void __exit driver_pcl730_cleanup_module(void) -{ - comedi_driver_unregister(&driver_pcl730); -} -module_exit(driver_pcl730_cleanup_module); +module_comedi_driver(pcl730_driver); MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_DESCRIPTION("Comedi low-level driver"); |