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

staging: comedi: addi_common.h: remove 'ui_AiFlags' from private data

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