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@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- .../staging/comedi/drivers/addi-data/addi_common.c | 22 ---------------------- drivers/staging/comedi/drivers/addi_apci_035.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_1032.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_1500.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_1516.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_1564.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_16xx.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_1710.c | 8 ++++++++ drivers/staging/comedi/drivers/addi_apci_2016.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_2032.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_2200.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_3001.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_3120.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_3200.c | 8 ++++++++ drivers/staging/comedi/drivers/addi_apci_3300.c | 8 ++++++++ drivers/staging/comedi/drivers/addi_apci_3501.c | 6 ++++++ drivers/staging/comedi/drivers/addi_apci_3xxx.c | 6 ++++++ 17 files changed, 102 insertions(+), 22 deletions(-) diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index 6d7f6ea..9b0f5b2 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -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 diff --git a/drivers/staging/comedi/drivers/addi_apci_035.c b/drivers/staging/comedi/drivers/addi_apci_035.c index 4c00df4..694b580 100644 --- a/drivers/staging/comedi/drivers/addi_apci_035.c +++ b/drivers/staging/comedi/drivers/addi_apci_035.c @@ -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 */ diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c index 7831ce3..bf983fc 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1032.c +++ b/drivers/staging/comedi/drivers/addi_apci_1032.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c index bfd84f6..20e14ac 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1500.c +++ b/drivers/staging/comedi/drivers/addi_apci_1500.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_1516.c b/drivers/staging/comedi/drivers/addi_apci_1516.c index a12e2f4..09b1c31 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1516.c +++ b/drivers/staging/comedi/drivers/addi_apci_1516.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index 1b9d598..72c6263 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_16xx.c b/drivers/staging/comedi/drivers/addi_apci_16xx.c index d54218d..23093a5 100644 --- a/drivers/staging/comedi/drivers/addi_apci_16xx.c +++ b/drivers/staging/comedi/drivers/addi_apci_16xx.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_1710.c b/drivers/staging/comedi/drivers/addi_apci_1710.c index df6ba8c..4853b31 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1710.c +++ b/drivers/staging/comedi/drivers/addi_apci_1710.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_2016.c b/drivers/staging/comedi/drivers/addi_apci_2016.c index fa50c7b..a1be859 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2016.c +++ b/drivers/staging/comedi/drivers/addi_apci_2016.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c index 073a8a5..07446d5 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2032.c +++ b/drivers/staging/comedi/drivers/addi_apci_2032.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_2200.c b/drivers/staging/comedi/drivers/addi_apci_2200.c index adfbb5d..0316462 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2200.c +++ b/drivers/staging/comedi/drivers/addi_apci_2200.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_3001.c b/drivers/staging/comedi/drivers/addi_apci_3001.c index 00ac762..71da7b1 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3001.c +++ b/drivers/staging/comedi/drivers/addi_apci_3001.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index c355158..db73b73 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_3200.c b/drivers/staging/comedi/drivers/addi_apci_3200.c index 1593139..eb4056b 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3200.c +++ b/drivers/staging/comedi/drivers/addi_apci_3200.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_3300.c b/drivers/staging/comedi/drivers/addi_apci_3300.c index 733c69a..94be644 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3300.c +++ b/drivers/staging/comedi/drivers/addi_apci_3300.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index dd2c1d3..e795f8d 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -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" diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c index 03161c8..fc3d50f 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c @@ -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" -- 1.7.11 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel