From: H Hartley Sweeten Date: Tue, 14 Oct 2014 17:44:47 +0000 (-0700) Subject: staging: comedi: addi_apci_035: separate from addi_common.h X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0317ffd281663c8f19567d8895866b23cb02e4fe;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: addi_apci_035: separate from addi_common.h Remove the need to include addi_common.h by introducing a new private data definition. Only include the members that are actually used by the driver. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c index a07ee1bd3311..d833da2eeac6 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c @@ -118,7 +118,7 @@ static int apci035_timer_config(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci035_private *devpriv = dev->private; unsigned int ui_Status; unsigned int ui_Command; unsigned int ui_Mode; @@ -248,7 +248,7 @@ static int apci035_timer_write(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci035_private *devpriv = dev->private; unsigned int ui_Command; int i_Count; @@ -345,7 +345,7 @@ static int apci035_timer_read(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci035_private *devpriv = dev->private; unsigned int ui_Status; /* Status register */ i_WatchdogNbr = insn->unused[0]; @@ -380,7 +380,7 @@ static int apci035_ai_config(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci035_private *devpriv = dev->private; devpriv->tsk_Current = current; outl(0x200 | 0, devpriv->iobase + 128 + 0x4); @@ -404,7 +404,7 @@ static int apci035_ai_read(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci035_private *devpriv = dev->private; unsigned int ui_CommandRegister; /* Set the start */ @@ -420,7 +420,7 @@ static int apci035_ai_read(struct comedi_device *dev, static int apci035_reset(struct comedi_device *dev) { - struct addi_private *devpriv = dev->private; + struct apci035_private *devpriv = dev->private; int i_Count; for (i_Count = 1; i_Count <= 4; i_Count++) { @@ -437,7 +437,7 @@ static int apci035_reset(struct comedi_device *dev) static irqreturn_t apci035_interrupt(int irq, void *d) { struct comedi_device *dev = d; - struct addi_private *devpriv = dev->private; + struct apci035_private *devpriv = dev->private; unsigned int ui_StatusRegister1; unsigned int ui_StatusRegister2; unsigned int ui_ReadCommand; diff --git a/drivers/staging/comedi/drivers/addi_apci_035.c b/drivers/staging/comedi/drivers/addi_apci_035.c index 37b58845231b..d7b7e1aa8b33 100644 --- a/drivers/staging/comedi/drivers/addi_apci_035.c +++ b/drivers/staging/comedi/drivers/addi_apci_035.c @@ -1,11 +1,20 @@ #include #include +#include +#include #include "../comedidev.h" #include "comedi_fc.h" #include "amcc_s5933.h" -#include "addi-data/addi_common.h" +struct apci035_private { + int iobase; + int i_IobaseAmcc; + int i_IobaseAddon; + int i_IobaseReserved; + unsigned char b_TimerSelectMode; + struct task_struct *tsk_Current; +}; #define ADDIDATA_WATCHDOG 2 /* Or shold it be something else */ @@ -15,7 +24,7 @@ static int apci035_auto_attach(struct comedi_device *dev, unsigned long context) { struct pci_dev *pcidev = comedi_to_pci_dev(dev); - struct addi_private *devpriv; + struct apci035_private *devpriv; struct comedi_subdevice *s; unsigned int dw_Dummy; int ret;