staging: comedi: refactor adl_pci9118 driver and use module_comedi_pci_driver
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 15 May 2012 20:42:04 +0000 (13:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 May 2012 00:56:54 +0000 (17:56 -0700)
commit618fc38f0047db1a3dbaf221d236b67deb5ae944
tree6d436f16dec1ec71420dea1087fcae36aab4ef1e
parent0d09df00279fde45535819e1cace3e9d330137e3
staging: comedi: refactor adl_pci9118 driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

While moving the struct boardtype, convert it to C99 initializers
to improve code readability. This results is a slight increase in
the total lines of code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/adl_pci9118.c