staging: comedi: addi-data: move the main #include's to the drivers
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 29 Oct 2012 23:51:33 +0000 (16:51 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 Oct 2012 17:47:32 +0000 (10:47 -0700)
The addi-data drivers are all built by the main driver files including
addi-data/addi_common.c. That file then includes other files depending
on what driver is being compiled. This is makes the code quite messy
and hard to follow.

Start cleaning it up by removing the unneeded #include's in addi_common.c
and moving the some of the comedi #include's into the individual driver
files.

This is the first step in getting rid of the #ifdef'ery in addi_common.c.

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>
17 files changed:
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi_apci_035.c
drivers/staging/comedi/drivers/addi_apci_1032.c
drivers/staging/comedi/drivers/addi_apci_1500.c
drivers/staging/comedi/drivers/addi_apci_1516.c
drivers/staging/comedi/drivers/addi_apci_1564.c
drivers/staging/comedi/drivers/addi_apci_16xx.c
drivers/staging/comedi/drivers/addi_apci_1710.c
drivers/staging/comedi/drivers/addi_apci_2016.c
drivers/staging/comedi/drivers/addi_apci_2032.c
drivers/staging/comedi/drivers/addi_apci_2200.c
drivers/staging/comedi/drivers/addi_apci_3001.c
drivers/staging/comedi/drivers/addi_apci_3120.c
drivers/staging/comedi/drivers/addi_apci_3200.c
drivers/staging/comedi/drivers/addi_apci_3300.c
drivers/staging/comedi/drivers/addi_apci_3501.c
drivers/staging/comedi/drivers/addi_apci_3xxx.c

index 6d7f6ea45c6d3b9d65bf58425636907032e4056d..9b0f5b2f6a11af74680d9ff72a6775843dab7ff1 100644 (file)
@@ -46,28 +46,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour
   +----------+-----------+------------------------------------------------+
 */
 
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/errno.h>
-#include <linux/ioport.h>
-#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/timex.h>
-#include <linux/timer.h>
-#include <linux/pci.h>
-#include <linux/gfp.h>
-#include <linux/io.h>
-#include "../../comedidev.h"
-#if defined(CONFIG_APCI_1710) || defined(CONFIG_APCI_3200) || defined(CONFIG_APCI_3300)
-#include <asm/i387.h>
-#endif
-#include "../comedi_fc.h"
-
-#include "addi_common.h"
-#include "addi_amcc_s5933.h"
-
 #ifndef ADDIDATA_DRIVER_NAME
 #define ADDIDATA_DRIVER_NAME   "addi_common"
 #endif
index 4c00df4bc15311986714ef884fd629cf5eee8898..694b58080a509f15035c5b4c72581892bd2645a5 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_035 1
 
 #define ADDIDATA_WATCHDOG 2    /*  Or shold it be something else */
index 7831ce33b02e2f632abeabe4e45cb6bb2a3ddcbf..bf983fcefab93f309f3524212b68e26322145cb6 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_1032 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_1032"
index bfd84f66d9c0b17728f6f448eb8f7ef2ac8c5cad..20e14acd110a1966b302208bba11355a93bfee61 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_1500 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_1500"
index a12e2f42137035b3d6afd166e3797e64ef418a4c..09b1c31a40ac90e802bc04f37e469678fe4a14e0 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_1516 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_1516"
index 1b9d598fb6ca1bb5312c0d7f8a56d9ee90303f7b..72c62635283465aa603058f216b17e371cf365be 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_1564 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_1564"
index d54218d59c58a349a23914388be192cc75da9dbb..23093a51d2728ae1d6327e25ca2bd1fe9576b66e 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_16XX 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_16xx"
index df6ba8ccf56f050b2062f87eca4ff8b27efa6a4f..4853b31f9e32d8b4a3c790af673c0e7968a4d7e0 100644 (file)
@@ -1,3 +1,11 @@
+#include <asm/i387.h>
+
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_1710 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_1710"
index fa50c7bb7ade2b77e0f7549f9e27f6c824ff7364..a1be859e56e895c9d1ff4372b73559ed3cd7c907 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_2016 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_2016"
index 073a8a56dbe41abf2db606860b6d051b6c454dbb..07446d5d82c095d02bbd35660a12eaaf010256c2 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_2032 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_2032"
index adfbb5d410ef0e58054fe13c805b7f2a8ff174cc..0316462bea653671354796dc8a89d1b11ff8410b 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_2200 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_2200"
index 00ac762965c12422ec12dadf6617914b41671032..71da7b168f6f823976bee3e9d45af9772603f982 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_3001 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_3001"
index c35515845cf3ac338739b08b13f865722aa0d30e..db73b736cddad699d82cdbf378792c1e502e22ae 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_3120 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_3120"
index 159313997dcf64fb97c2233cb661ea58cf8b2304..eb4056bf38fc5dafe0cd32a855118b58a62a00fc 100644 (file)
@@ -1,3 +1,11 @@
+#include <asm/i387.h>
+
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_3200 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_3200"
index 733c69abc43a57901d27479105a8d0dfde396eba..94be6449a8c3559523a1a7ee5c926bd7d9def26b 100644 (file)
@@ -1,3 +1,11 @@
+#include <asm/i387.h>
+
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_3300 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_3300"
index dd2c1d3bc18be6dd2d168cd0daefb89b89937607..e795f8d4e32df14b89ca456bdf69828efba2c797 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_3501 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_3501"
index 03161c88eac2ae5a6f7a53bdec3d8b2448770fd7..fc3d50fcecfeb3357e9a9fcb2b5183fba090f805 100644 (file)
@@ -1,3 +1,9 @@
+#include "../comedidev.h"
+#include "comedi_fc.h"
+
+#include "addi-data/addi_common.h"
+#include "addi-data/addi_amcc_s5933.h"
+
 #define CONFIG_APCI_3XXX 1
 
 #define ADDIDATA_DRIVER_NAME   "addi_apci_3xxx"