staging: comedi: das08: Reduce conditional compilation
authorIan Abbott <abbotti@mev.co.uk>
Wed, 6 Jun 2012 12:43:55 +0000 (13:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Jun 2012 23:51:46 +0000 (16:51 -0700)
commit4bfa9b2ee16e73087435ac64a35f32140a385438
tree1e92f517caa78bc9d58e96049d1cca7a8b70f692
parenta6e51c1e3425fe61040e9e770f514cfdf576a1f0
staging: comedi: das08: Reduce conditional compilation

This code is used by some combination of the CONFIG_COMEDI_DAS08_CS,
CONFIG_COMEDI_DAS08_ISA, and CONFIG_COMEDI_DAS08_PCI and contains a lot
of conditional compilation.

Remove most of the conditional compilation, relying on the compiler to
optimize out unused static functions and data.  Use the '__maybe_unused'
tag for those functions that cause compiler warnings as a result of
this.

Also change the DO_COMEDI_DRIVER_REGISTER macro from a conditionally
defined macro to a manifest constant macro to allow it to be tested
outside the preprocessor (although this is not currently needed).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/das08.c
This page took 0.026234 seconds and 5 git commands to generate.