diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-04-29 11:08:36 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-03 20:02:42 -0400 |
commit | 5297a6ba0aba3d8c8238b53525a231a65fced0bf (patch) | |
tree | 9788dfedb1ab9b8991836114974e06c276bc6c99 /drivers | |
parent | 17ac5ecf20e77833adbc01dcf82cb74c1e4c6896 (diff) |
staging: comedi: adv_pci1710: remove 'ai_eos' from private data
This member of the private data is is not necessary. We can just check the
cmd->flags for TRIG_WAKE_EOS when needed. Remvoe the member.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/comedi/drivers/adv_pci1710.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 4c9454e82b3a..6bdd915dc796 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -302,7 +302,6 @@ struct pci1710_private { unsigned int i8254_osc_base; /* frequence of onboard oscilator */ unsigned int ai_act_scan; /* how many scans we finished */ unsigned int ai_act_chan; /* actual position in actual scan */ - unsigned char ai_eos; /* 1=EOS wake up */ unsigned char ai_et; unsigned int ai_et_CntrlReg; unsigned int ai_et_MuxVal; @@ -916,9 +915,15 @@ static irqreturn_t interrupt_service_pci1710(int irq, void *d) { struct comedi_device *dev = d; struct pci1710_private *devpriv = dev->private; + struct comedi_subdevice *s; + struct comedi_cmd *cmd; if (!dev->attached) /* is device attached? */ return IRQ_NONE; /* no, exit */ + + s = dev->read_subdev; + cmd = &s->async->cmd; + /* is this interrupt from our board? */ if (!(inw(dev->iobase + PCI171x_STATUS) & Status_IRQ)) return IRQ_NONE; /* no, exit */ @@ -937,11 +942,12 @@ static irqreturn_t interrupt_service_pci1710(int irq, void *d) start_pacer(dev, 1, devpriv->ai_et_div1, devpriv->ai_et_div2); return IRQ_HANDLED; } - if (devpriv->ai_eos) { /* We use FIFO half full INT or not? */ + + if (cmd->flags & TRIG_WAKE_EOS) interrupt_pci1710_every_sample(d); - } else { + else interrupt_pci1710_half_fifo(d); - } + return IRQ_HANDLED; } @@ -973,13 +979,8 @@ static int pci171x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) s->async->cur_chan = 0; devpriv->CntrlReg &= Control_CNT0; - /* don't we want wake up every scan? devpriv->ai_eos=1; */ - if (cmd->flags & TRIG_WAKE_EOS) { - devpriv->ai_eos = 1; - } else { + if ((cmd->flags & TRIG_WAKE_EOS) == 0) devpriv->CntrlReg |= Control_ONEFH; - devpriv->ai_eos = 0; - } switch (mode) { case 1: |