summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/Makefile
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-01-30 15:21:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-31 10:35:48 +0100
commitabac8b54a353b9a1ac7d09ff790812655f618896 (patch)
tree987dc914a3b1a8aadb7559db0101ebf3a9a79e63 /drivers/staging/comedi/Makefile
parentae5943de8c8c4438cbac5cda599ff0b88c224468 (diff)
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>
Diffstat (limited to 'drivers/staging/comedi/Makefile')
-rw-r--r--drivers/staging/comedi/Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/staging/comedi/Makefile b/drivers/staging/comedi/Makefile
index 51816c3fc268..872a87b9642e 100644
--- a/drivers/staging/comedi/Makefile
+++ b/drivers/staging/comedi/Makefile
@@ -1,9 +1,10 @@
-comedi-y := comedi_fops.o range.o drivers.o \
- comedi_buf.o
-comedi-$(CONFIG_PROC_FS) += proc.o
-comedi-$(CONFIG_COMPAT) += comedi_compat32.o
+comedi-y := comedi_fops.o range.o drivers.o \
+ comedi_buf.o
+comedi-$(CONFIG_COMEDI_USB_DRIVERS) += comedi_usb.o
+comedi-$(CONFIG_PROC_FS) += proc.o
+comedi-$(CONFIG_COMPAT) += comedi_compat32.o
-obj-$(CONFIG_COMEDI) += comedi.o
+obj-$(CONFIG_COMEDI) += comedi.o
-obj-$(CONFIG_COMEDI) += kcomedilib/
-obj-$(CONFIG_COMEDI) += drivers/
+obj-$(CONFIG_COMEDI) += kcomedilib/
+obj-$(CONFIG_COMEDI) += drivers/