diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-04-22 21:31:47 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-23 13:41:37 -0400 |
commit | 79a8c0e20eb9f0cb6aaaab87c56addff606d19fe (patch) | |
tree | 46939f4170e8195518964f8c815486340c666c0f | |
parent | 7d0a66c0ccfd0ec23645ba2d92593c00d11bf936 (diff) |
staging: comedi: das800: move module_{init, exit} to end of file
The module_comedi_driver() macro provides the module_{init.exit}
code for this driver. Move the macro call and the comedi_driver
declaration to the end of the file. This also removes the need
for the das800_attach() forward declaration.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/das800.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/staging/comedi/drivers/das800.c b/drivers/staging/comedi/drivers/das800.c index 6e37033eab5b..3a4041d6f5e6 100644 --- a/drivers/staging/comedi/drivers/das800.c +++ b/drivers/staging/comedi/drivers/das800.c | |||
@@ -228,20 +228,8 @@ struct das800_private { | |||
228 | volatile int do_bits; /* digital output bits */ | 228 | volatile int do_bits; /* digital output bits */ |
229 | }; | 229 | }; |
230 | 230 | ||
231 | static int das800_attach(struct comedi_device *dev, | ||
232 | struct comedi_devconfig *it); | ||
233 | static int das800_cancel(struct comedi_device *dev, struct comedi_subdevice *s); | 231 | static int das800_cancel(struct comedi_device *dev, struct comedi_subdevice *s); |
234 | 232 | ||
235 | static struct comedi_driver driver_das800 = { | ||
236 | .driver_name = "das800", | ||
237 | .module = THIS_MODULE, | ||
238 | .attach = das800_attach, | ||
239 | .detach = comedi_legacy_detach, | ||
240 | .num_names = ARRAY_SIZE(das800_boards), | ||
241 | .board_name = &das800_boards[0].name, | ||
242 | .offset = sizeof(struct das800_board), | ||
243 | }; | ||
244 | |||
245 | static irqreturn_t das800_interrupt(int irq, void *d); | 233 | static irqreturn_t das800_interrupt(int irq, void *d); |
246 | static void enable_das800(struct comedi_device *dev); | 234 | static void enable_das800(struct comedi_device *dev); |
247 | static void disable_das800(struct comedi_device *dev); | 235 | static void disable_das800(struct comedi_device *dev); |
@@ -329,8 +317,6 @@ static int das800_probe(struct comedi_device *dev) | |||
329 | return -1; | 317 | return -1; |
330 | } | 318 | } |
331 | 319 | ||
332 | module_comedi_driver(driver_das800); | ||
333 | |||
334 | /* interrupt service routine */ | 320 | /* interrupt service routine */ |
335 | static irqreturn_t das800_interrupt(int irq, void *d) | 321 | static irqreturn_t das800_interrupt(int irq, void *d) |
336 | { | 322 | { |
@@ -848,6 +834,17 @@ static int das800_set_frequency(struct comedi_device *dev) | |||
848 | return 0; | 834 | return 0; |
849 | } | 835 | } |
850 | 836 | ||
837 | static struct comedi_driver driver_das800 = { | ||
838 | .driver_name = "das800", | ||
839 | .module = THIS_MODULE, | ||
840 | .attach = das800_attach, | ||
841 | .detach = comedi_legacy_detach, | ||
842 | .num_names = ARRAY_SIZE(das800_boards), | ||
843 | .board_name = &das800_boards[0].name, | ||
844 | .offset = sizeof(struct das800_board), | ||
845 | }; | ||
846 | module_comedi_driver(driver_das800); | ||
847 | |||
851 | MODULE_AUTHOR("Comedi http://www.comedi.org"); | 848 | MODULE_AUTHOR("Comedi http://www.comedi.org"); |
852 | MODULE_DESCRIPTION("Comedi low-level driver"); | 849 | MODULE_DESCRIPTION("Comedi low-level driver"); |
853 | MODULE_LICENSE("GPL"); | 850 | MODULE_LICENSE("GPL"); |