Skip to content

Commit

Permalink
staging: comedi: addi-data: remove the addi-data #include ifdef'ery
Browse files Browse the repository at this point in the history
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 <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 30, 2012
1 parent 02913e0 commit bf6a157
Show file tree
Hide file tree
Showing 17 changed files with 62 additions and 60 deletions.
60 changes: 0 additions & 60 deletions drivers/staging/comedi/drivers/addi-data/addi_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_035.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1500.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1516.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1564.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_16xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
12 changes: 12 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1710.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_2016.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_2032.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_3001.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_3120.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
12 changes: 12 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_3200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
12 changes: 12 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_3300.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_3501.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_3xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit bf6a157

Please sign in to comment.