From: H Hartley Sweeten Date: Mon, 29 Oct 2012 23:52:03 +0000 (-0700) Subject: staging: comedi: addi-data: remove the addi-data #include ifdef'ery X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bf6a1578c10a4f3ef94a3c744267f18f9c3642bd;p=linux-beck.git staging: comedi: addi-data: remove the addi-data #include ifdef'ery Move the addi-data specific #include's from addi_common.h to the individual driver files. The apci-1710, apci-3200, and apci-3300 drivers still have floating point code in them and are currently disabled in the Kconfig and Makefile. For now, move the fpu_{begin,end} functions from addi_common.c to the main driver file so we can get rid of the #ifdef'ery. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index 985ec8848d33..f4311a433a5d 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -54,66 +54,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour /* Update-0.7.57->0.7.68MODULE_DESCRIPTION("Comedi ADDI-DATA module"); */ /* Update-0.7.57->0.7.68MODULE_LICENSE("GPL"); */ -#if defined(CONFIG_APCI_1710) || defined(CONFIG_APCI_3200) || defined(CONFIG_APCI_3300) -/* BYTE b_SaveFPUReg [94]; */ - -void fpu_begin(void) -{ - /* asm ("fstenv b_SaveFPUReg"); */ - kernel_fpu_begin(); -} - -void fpu_end(void) -{ - /* asm ("frstor b_SaveFPUReg"); */ - kernel_fpu_end(); -} -#endif - -#include "addi_eeprom.c" -#if (defined (CONFIG_APCI_3120) || defined (CONFIG_APCI_3001)) -#include "hwdrv_apci3120.c" -#endif -#ifdef CONFIG_APCI_1032 -#include "hwdrv_apci1032.c" -#endif -#ifdef CONFIG_APCI_1516 -#include "hwdrv_apci1516.c" -#endif -#ifdef CONFIG_APCI_2016 -#include "hwdrv_apci2016.c" -#endif -#ifdef CONFIG_APCI_2032 -#include "hwdrv_apci2032.c" -#endif -#ifdef CONFIG_APCI_2200 -#include "hwdrv_apci2200.c" -#endif -#ifdef CONFIG_APCI_1564 -#include "hwdrv_apci1564.c" -#endif -#ifdef CONFIG_APCI_1500 -#include "hwdrv_apci1500.c" -#endif -#ifdef CONFIG_APCI_3501 -#include "hwdrv_apci3501.c" -#endif -#ifdef CONFIG_APCI_035 -#include "hwdrv_apci035.c" -#endif -#if (defined (CONFIG_APCI_3200) || defined (CONFIG_APCI_3300)) -#include "hwdrv_apci3200.c" -#endif -#ifdef CONFIG_APCI_1710 -#include "hwdrv_APCI1710.c" -#endif -#ifdef CONFIG_APCI_16XX -#include "hwdrv_apci16xx.c" -#endif -#ifdef CONFIG_APCI_3XXX -#include "hwdrv_apci3xxx.c" -#endif - #ifndef COMEDI_SUBD_TTLIO #define COMEDI_SUBD_TTLIO 11 /* Digital Input Output But TTL */ #endif diff --git a/drivers/staging/comedi/drivers/addi_apci_035.c b/drivers/staging/comedi/drivers/addi_apci_035.c index 694b58080a50..85c7ee474bf0 100644 --- a/drivers/staging/comedi/drivers/addi_apci_035.c +++ b/drivers/staging/comedi/drivers/addi_apci_035.c @@ -10,6 +10,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_035" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci035.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c index bf983fcefab9..e7a8f92f551a 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1032.c +++ b/drivers/staging/comedi/drivers/addi_apci_1032.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_1032" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci1032.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c index 20e14acd110a..c2a89c4fa982 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1500.c +++ b/drivers/staging/comedi/drivers/addi_apci_1500.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_1500" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci1500.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1516.c b/drivers/staging/comedi/drivers/addi_apci_1516.c index 09b1c31a40ac..2504b641d2ec 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1516.c +++ b/drivers/staging/comedi/drivers/addi_apci_1516.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_1516" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci1516.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c index 72c626352834..a37b3c4a9351 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1564.c +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_1564" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci1564.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_16xx.c b/drivers/staging/comedi/drivers/addi_apci_16xx.c index 23093a51d272..f8ef19f082ba 100644 --- a/drivers/staging/comedi/drivers/addi_apci_16xx.c +++ b/drivers/staging/comedi/drivers/addi_apci_16xx.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_16xx" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci16xx.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_1710.c b/drivers/staging/comedi/drivers/addi_apci_1710.c index 4853b31f9e32..fb805d024595 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1710.c +++ b/drivers/staging/comedi/drivers/addi_apci_1710.c @@ -6,8 +6,20 @@ #include "addi-data/addi_common.h" #include "addi-data/addi_amcc_s5933.h" +static void fpu_begin(void) +{ + kernel_fpu_begin(); +} + +static void fpu_end(void) +{ + kernel_fpu_end(); +} + #define CONFIG_APCI_1710 1 #define ADDIDATA_DRIVER_NAME "addi_apci_1710" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_APCI1710.c" #include "addi-data/addi_common.c" diff --git a/drivers/staging/comedi/drivers/addi_apci_2016.c b/drivers/staging/comedi/drivers/addi_apci_2016.c index a1be859e56e8..bb2ee960fdd7 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2016.c +++ b/drivers/staging/comedi/drivers/addi_apci_2016.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_2016" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci2016.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c index 07446d5d82c0..7733758b756f 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2032.c +++ b/drivers/staging/comedi/drivers/addi_apci_2032.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_2032" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci2032.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_2200.c b/drivers/staging/comedi/drivers/addi_apci_2200.c index 0316462bea65..ac13fc3502dc 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2200.c +++ b/drivers/staging/comedi/drivers/addi_apci_2200.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_2200" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci2200.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_3001.c b/drivers/staging/comedi/drivers/addi_apci_3001.c index 71da7b168f6f..084dfcf0cd25 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3001.c +++ b/drivers/staging/comedi/drivers/addi_apci_3001.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_3001" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci3120.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index db73b736cdda..6324f7457f4e 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_3120" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci3120.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_3200.c b/drivers/staging/comedi/drivers/addi_apci_3200.c index eb4056bf38fc..34ac22a54df8 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3200.c +++ b/drivers/staging/comedi/drivers/addi_apci_3200.c @@ -6,8 +6,20 @@ #include "addi-data/addi_common.h" #include "addi-data/addi_amcc_s5933.h" +static void fpu_begin(void) +{ + kernel_fpu_begin(); +} + +static void fpu_end(void) +{ + kernel_fpu_end(); +} + #define CONFIG_APCI_3200 1 #define ADDIDATA_DRIVER_NAME "addi_apci_3200" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci3200.c" #include "addi-data/addi_common.c" diff --git a/drivers/staging/comedi/drivers/addi_apci_3300.c b/drivers/staging/comedi/drivers/addi_apci_3300.c index 94be6449a8c3..5d3d567c89d1 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3300.c +++ b/drivers/staging/comedi/drivers/addi_apci_3300.c @@ -6,8 +6,20 @@ #include "addi-data/addi_common.h" #include "addi-data/addi_amcc_s5933.h" +static void fpu_begin(void) +{ + kernel_fpu_begin(); +} + +static void fpu_end(void) +{ + kernel_fpu_end(); +} + #define CONFIG_APCI_3300 1 #define ADDIDATA_DRIVER_NAME "addi_apci_3300" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci3200.c" #include "addi-data/addi_common.c" diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index e795f8d4e32d..8fb5b50de201 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_3501" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci3501.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org"); diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c index fc3d50fcecfe..c5205d3e25dd 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c @@ -8,6 +8,8 @@ #define ADDIDATA_DRIVER_NAME "addi_apci_3xxx" +#include "addi-data/addi_eeprom.c" +#include "addi-data/hwdrv_apci3xxx.c" #include "addi-data/addi_common.c" MODULE_AUTHOR("Comedi http://www.comedi.org");