Commit 4029bd3d authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: adl_pci9118: remove 'useeoshandle' from private data

This member of the private data is always set to 0. Remove it and the
affected code.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ad7a6230
...@@ -378,10 +378,6 @@ struct pci9118_private { ...@@ -378,10 +378,6 @@ struct pci9118_private {
*/ */
unsigned char ai16bits; /* =1 16 bit card */ unsigned char ai16bits; /* =1 16 bit card */
unsigned char usedma; /* =1 use DMA transfer and not INT */ unsigned char usedma; /* =1 use DMA transfer and not INT */
unsigned char useeoshandle; /*
* =1 change WAKE_EOS DMA transfer
* to fit on every second
*/
int softsshdelay; /* int softsshdelay; /*
* >0 use software S&H, * >0 use software S&H,
* numer is requested delay in ns * numer is requested delay in ns
...@@ -452,7 +448,7 @@ static int check_channel_list(struct comedi_device *dev, ...@@ -452,7 +448,7 @@ static int check_channel_list(struct comedi_device *dev,
static int setup_channel_list(struct comedi_device *dev, static int setup_channel_list(struct comedi_device *dev,
struct comedi_subdevice *s, int n_chan, struct comedi_subdevice *s, int n_chan,
unsigned int *chanlist, int rot, int frontadd, unsigned int *chanlist, int rot, int frontadd,
int backadd, int usedma, char useeos) int backadd, int usedma)
{ {
struct pci9118_private *devpriv = dev->private; struct pci9118_private *devpriv = dev->private;
unsigned int i, differencial = 0, bipolar = 0; unsigned int i, differencial = 0, bipolar = 0;
...@@ -536,18 +532,6 @@ static int setup_channel_list(struct comedi_device *dev, ...@@ -536,18 +532,6 @@ static int setup_channel_list(struct comedi_device *dev,
#ifdef PCI9118_PARANOIDCHECK #ifdef PCI9118_PARANOIDCHECK
devpriv->chanlist[n_chan ^ usedma] = devpriv->chanlist[0 ^ usedma]; devpriv->chanlist[n_chan ^ usedma] = devpriv->chanlist[0 ^ usedma];
/* for 32bit operations */ /* for 32bit operations */
if (useeos) {
for (i = 1; i < n_chan; i++) { /* store range list to card */
devpriv->chanlist[(n_chan + i) ^ usedma] =
(CR_CHAN(chanlist[i]) & 0xf) << rot;
}
devpriv->chanlist[(2 * n_chan) ^ usedma] =
devpriv->chanlist[0 ^ usedma];
/* for 32bit operations */
useeos = 2;
} else {
useeos = 1;
}
#endif #endif
outl(0, dev->iobase + PCI9118_SCANMOD); /* close scan queue */ outl(0, dev->iobase + PCI9118_SCANMOD); /* close scan queue */
/* udelay(100); important delay, or first sample will be crippled */ /* udelay(100); important delay, or first sample will be crippled */
...@@ -587,7 +571,7 @@ static int pci9118_insn_read_ai(struct comedi_device *dev, ...@@ -587,7 +571,7 @@ static int pci9118_insn_read_ai(struct comedi_device *dev,
* trigger stop * trigger stop
*/ */
if (!setup_channel_list(dev, s, 1, &insn->chanspec, 0, 0, 0, 0, 0)) if (!setup_channel_list(dev, s, 1, &insn->chanspec, 0, 0, 0, 0))
return -EINVAL; return -EINVAL;
outl(0, dev->iobase + PCI9118_DELFIFO); /* flush FIFO */ outl(0, dev->iobase + PCI9118_DELFIFO); /* flush FIFO */
...@@ -1353,8 +1337,6 @@ static int Compute_and_setup_dma(struct comedi_device *dev, ...@@ -1353,8 +1337,6 @@ static int Compute_and_setup_dma(struct comedi_device *dev,
} else { } else {
/* short first DMA buffer to one scan */ /* short first DMA buffer to one scan */
dmalen0 = devpriv->ai_n_realscanlen << 1; dmalen0 = devpriv->ai_n_realscanlen << 1;
if (devpriv->useeoshandle)
dmalen0 += 2;
if (dmalen0 < 4) { if (dmalen0 < 4) {
dev_info(dev->class_dev, dev_info(dev->class_dev,
"ERR: DMA0 buf len bug? (%d<4)\n", "ERR: DMA0 buf len bug? (%d<4)\n",
...@@ -1373,8 +1355,6 @@ static int Compute_and_setup_dma(struct comedi_device *dev, ...@@ -1373,8 +1355,6 @@ static int Compute_and_setup_dma(struct comedi_device *dev,
} else { } else {
/* short second DMA buffer to one scan */ /* short second DMA buffer to one scan */
dmalen1 = devpriv->ai_n_realscanlen << 1; dmalen1 = devpriv->ai_n_realscanlen << 1;
if (devpriv->useeoshandle)
dmalen1 -= 2;
if (dmalen1 < 4) { if (dmalen1 < 4) {
dev_info(dev->class_dev, dev_info(dev->class_dev,
"ERR: DMA1 buf len bug? (%d<4)\n", "ERR: DMA1 buf len bug? (%d<4)\n",
...@@ -1630,7 +1610,6 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1630,7 +1610,6 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
*/ */
devpriv->ai_add_front = 0; devpriv->ai_add_front = 0;
devpriv->ai_add_back = 0; devpriv->ai_add_back = 0;
devpriv->useeoshandle = 0;
if (devpriv->master) { if (devpriv->master) {
devpriv->usedma = 1; devpriv->usedma = 1;
if ((cmd->flags & TRIG_WAKE_EOS) && if ((cmd->flags & TRIG_WAKE_EOS) &&
...@@ -1649,10 +1628,6 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1649,10 +1628,6 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
(cmd->scan_end_arg & 1) && (cmd->scan_end_arg & 1) &&
(cmd->scan_end_arg > 1)) { (cmd->scan_end_arg > 1)) {
if (cmd->scan_begin_src == TRIG_FOLLOW) { if (cmd->scan_begin_src == TRIG_FOLLOW) {
/*
* vpriv->useeoshandle=1; // change DMA transfer
* block to fit EOS on every second call
*/
devpriv->usedma = 0; devpriv->usedma = 0;
/* /*
* XXX maybe can be corrected to use 16 bit DMA * XXX maybe can be corrected to use 16 bit DMA
...@@ -1711,8 +1686,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1711,8 +1686,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
return -EINVAL; return -EINVAL;
if (!setup_channel_list(dev, s, cmd->chanlist_len, if (!setup_channel_list(dev, s, cmd->chanlist_len,
cmd->chanlist, 0, devpriv->ai_add_front, cmd->chanlist, 0, devpriv->ai_add_front,
devpriv->ai_add_back, devpriv->usedma, devpriv->ai_add_back, devpriv->usedma))
devpriv->useeoshandle))
return -EINVAL; return -EINVAL;
/* compute timers settings */ /* compute timers settings */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment