staging: comedi: addi_common.h: remove 'ui_AiFlags' from private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 29 Apr 2014 19:59:40 +0000 (12:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 4 May 2014 00:06:32 +0000 (20:06 -0400)
This member of the private data is a copy of the cmd->flags. Use that instead.

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>
drivers/staging/comedi/drivers/addi-data/addi_common.h
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c

index 2ed2da3499f44a3c012c6b9bda78019bba1680a5..f4f0da5a26f850054e090f9f3aea005050f2e1fc 100644 (file)
@@ -127,7 +127,6 @@ struct addi_private {
        unsigned int ui_AiReadData[32];
        unsigned int ui_AiTimer0;       /* Timer Constant for Timer0 */
        unsigned int ui_AiTimer1;       /* Timer constant for Timer1 */
-       unsigned int ui_AiFlags;
        unsigned int ui_AiDataLength;
        unsigned int ui_AiNbrofScans;   /*  number of scans to do */
        unsigned short us_UseDma;       /*  To use Dma or not */
index 7ead23e34e8ebba36e480c527945c0293e8fbfe8..2bfccbbf59625c9f044beafabb6e44a91968a346 100644 (file)
@@ -819,6 +819,7 @@ static int apci3120_cyclic_ai(int mode,
 {
        const struct addi_board *this_board = comedi_board(dev);
        struct addi_private *devpriv = dev->private;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned char b_Tmp;
        unsigned int ui_Tmp, ui_DelayTiming = 0, ui_TimerValue1 = 0, dmalen0 =
                0, dmalen1 = 0, ui_TimerValue2 =
@@ -1135,7 +1136,7 @@ static int apci3120_cyclic_ai(int mode,
                                        devpriv->ui_AiScanLength * 2 - dmalen0;
                }
 
-               if (devpriv->ui_AiFlags & TRIG_WAKE_EOS) {
+               if (cmd->flags & TRIG_WAKE_EOS) {
                        /*  don't we want wake up every scan? */
                        if (dmalen0 > (devpriv->ui_AiScanLength * 2)) {
                                dmalen0 = devpriv->ui_AiScanLength * 2;
@@ -1335,7 +1336,6 @@ static int apci3120_ai_cmd(struct comedi_device *dev,
        struct comedi_cmd *cmd = &s->async->cmd;
 
        /* loading private structure with cmd structure inputs */
-       devpriv->ui_AiFlags = cmd->flags;
        devpriv->ui_AiNbrofChannels = cmd->chanlist_len;
        devpriv->ui_AiScanLength = cmd->scan_end_arg;
        devpriv->pui_AiChannelList = cmd->chanlist;
@@ -1410,6 +1410,7 @@ static void apci3120_interrupt_dma(int irq, void *d)
        struct comedi_device *dev = d;
        struct addi_private *devpriv = dev->private;
        struct comedi_subdevice *s = dev->read_subdev;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int next_dma_buf, samplesinbuf;
        unsigned long low_word, high_word, var;
        unsigned int ui_Tmp;
@@ -1487,7 +1488,7 @@ static void apci3120_interrupt_dma(int irq, void *d)
                        devpriv->ul_DmaBufferVirtual[devpriv->
                                ui_DmaActualBuffer], samplesinbuf);
 
-               if (!(devpriv->ui_AiFlags & TRIG_WAKE_EOS)) {
+               if (!(cmd->flags & TRIG_WAKE_EOS)) {
                        s->async->events |= COMEDI_CB_EOS;
                        comedi_event(dev, s);
                }
This page took 0.028027 seconds and 5 git commands to generate.