staging: comedi: conditionally build in USB driver support
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 30 Jan 2013 22:21:49 +0000 (15:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 31 Jan 2013 09:35:48 +0000 (10:35 +0100)
commitabac8b54a353b9a1ac7d09ff790812655f618896
tree987dc914a3b1a8aadb7559db0101ebf3a9a79e63
parentae5943de8c8c4438cbac5cda599ff0b88c224468
staging: comedi: conditionally build in USB driver support

Separate the comedi_usb_* functions out of drivers.c into a new
source file, comedi_usb.c. This allows conditionally building
support for comedi USB drivers into the comedi core without the
need for the #if'defery. Fix the Kconfig and Makefile appropriately.
For aesthetic reasons, add some whitespace to the Makefile to keep
everything lined up.

Group all the comedi_usb_* prototypes into one place in comedidev.h.
Protect these prototypes with an #ifdef so that building a comedi
usb driver without USB support will cause a build error. This will
normally not happen as long as the comedi USB driver is placed in
the proper group in the Kconfig.

Remove the #include<linux/usb.h> from comedidev.h and drivers.c. This
include is only needed by the comedi USB driver support code and the
USB drivers. The include should occur in those files.

Removing the include of usb.h exposed a couple drivers that need
<linux/interrupt.h> and <linux/sched.h>. Add the missing includes.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/Kconfig
drivers/staging/comedi/Makefile
drivers/staging/comedi/comedi_usb.c [new file with mode: 0644]
drivers/staging/comedi/comedidev.h
drivers/staging/comedi/drivers.c
drivers/staging/comedi/drivers/addi_apci_1032.c
drivers/staging/comedi/drivers/addi_apci_2032.c
drivers/staging/comedi/drivers/addi_apci_3501.c