Commit 77114526 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: refactor c6xdigio driver to remove forward declarations

Move the struct comedi_driver variable to remove the need
or the forward declarations.
Signed-off-by: default avatarH 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent abae41e6
...@@ -97,16 +97,6 @@ union encvaluetype { ...@@ -97,16 +97,6 @@ union encvaluetype {
#define C6XDIGIO_TIME_OUT 20 #define C6XDIGIO_TIME_OUT 20
static int c6xdigio_attach(struct comedi_device *dev,
struct comedi_devconfig *it);
static int c6xdigio_detach(struct comedi_device *dev);
struct comedi_driver driver_c6xdigio = {
.driver_name = "c6xdigio",
.module = THIS_MODULE,
.attach = c6xdigio_attach,
.detach = c6xdigio_detach,
};
static void C6X_pwmInit(unsigned long baseAddr) static void C6X_pwmInit(unsigned long baseAddr)
{ {
int timeout = 0; int timeout = 0;
...@@ -518,17 +508,23 @@ static int c6xdigio_detach(struct comedi_device *dev) ...@@ -518,17 +508,23 @@ static int c6xdigio_detach(struct comedi_device *dev)
return 0; return 0;
} }
struct comedi_driver driver_c6xdigio = {
.driver_name = "c6xdigio",
.module = THIS_MODULE,
.attach = c6xdigio_attach,
.detach = c6xdigio_detach,
};
static int __init driver_c6xdigio_init_module(void) static int __init driver_c6xdigio_init_module(void)
{ {
return comedi_driver_register(&driver_c6xdigio); return comedi_driver_register(&driver_c6xdigio);
} }
module_init(driver_c6xdigio_init_module);
static void __exit driver_c6xdigio_cleanup_module(void) static void __exit driver_c6xdigio_cleanup_module(void)
{ {
comedi_driver_unregister(&driver_c6xdigio); comedi_driver_unregister(&driver_c6xdigio);
} }
module_init(driver_c6xdigio_init_module);
module_exit(driver_c6xdigio_cleanup_module); module_exit(driver_c6xdigio_cleanup_module);
MODULE_AUTHOR("Comedi http://www.comedi.org"); MODULE_AUTHOR("Comedi http://www.comedi.org");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment