From: H Hartley Sweeten Date: Tue, 14 Oct 2014 17:44:48 +0000 (-0700) Subject: staging: comedi: addi_apci_1500: separate from addi_common.h X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1b7d0642b873370babbd4cb7843de0f2d0446dc9;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: addi_apci_1500: 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_apci1500.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c index 9896468d86f9..bfa9228c833f 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1500.c @@ -158,7 +158,7 @@ static int apci1500_di_config(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; int i_PatternPolarity = 0, i_PatternTransition = 0, i_PatternMask = 0; int i_MaxChannel = 0, i_Count = 0, i_EventMask = 0; int i_PatternTransitionCount = 0, i_RegValue; @@ -466,7 +466,7 @@ static int apci1500_di_write(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; int i_Event1InterruptStatus = 0, i_Event2InterruptStatus = 0, i_RegValue; @@ -653,7 +653,7 @@ static int apci1500_di_read(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; int i_DummyRead = 0; /* Software reset */ @@ -789,7 +789,7 @@ static int apci1500_di_insn_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; data[1] = inw(devpriv->i_IobaseAddon + APCI1500_DIGITAL_IP); @@ -807,7 +807,7 @@ static int apci1500_do_config(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; devpriv->b_OutputMemoryStatus = data[0]; return insn->n; @@ -821,7 +821,7 @@ static int apci1500_do_write(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; static unsigned int ui_Temp; unsigned int ui_Temp1; unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */ @@ -981,7 +981,7 @@ static int apci1500_timer_config(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; int i_TimerCounterMode, i_MasterConfiguration; devpriv->tsk_Current = current; @@ -1471,7 +1471,7 @@ static int apci1500_timer_write(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; int i_CommandAndStatusValue; switch (data[0]) { @@ -1731,7 +1731,7 @@ static int apci1500_timer_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; int i_CommandAndStatusValue; switch (data[0]) { @@ -1895,7 +1895,7 @@ static int apci1500_do_bits(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; unsigned int ui_Status; int i_RegValue; int i_Constant; @@ -2015,7 +2015,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d) { struct comedi_device *dev = d; - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; unsigned int ui_InterruptStatus = 0; int i_RegValue = 0; @@ -2186,7 +2186,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d) static int apci1500_reset(struct comedi_device *dev) { - struct addi_private *devpriv = dev->private; + struct apci1500_private *devpriv = dev->private; int i_DummyRead = 0; i_TimerCounter1Init = 0; diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c index dc90a8f5388f..de8d74fc6335 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1500.c +++ b/drivers/staging/comedi/drivers/addi_apci_1500.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 apci1500_private { + int iobase; + int i_IobaseAmcc; + int i_IobaseAddon; + int i_IobaseReserved; + unsigned char b_OutputMemoryStatus; + struct task_struct *tsk_Current; +}; #include "addi-data/hwdrv_apci1500.c" @@ -13,7 +22,7 @@ static int apci1500_auto_attach(struct comedi_device *dev, unsigned long context) { struct pci_dev *pcidev = comedi_to_pci_dev(dev); - struct addi_private *devpriv; + struct apci1500_private *devpriv; struct comedi_subdevice *s; int ret;