提交 8bc1bd1f 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

staging: comedi: rtd520: rename CamelCase aiCount

Rename this private data variable to ai_count.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: NIan Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 2f021034
......@@ -394,7 +394,7 @@ struct rtd_private {
void __iomem *las1;
void __iomem *lcfg;
long aiCount; /* total transfer size (samples) */
long ai_count; /* total transfer size (samples) */
int xfer_count; /* # to transfer data. 0->1/2FIFO */
int flags; /* flag event modes */
......@@ -653,7 +653,7 @@ static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s,
short sample;
s16 d;
if (0 == devpriv->aiCount) { /* done */
if (0 == devpriv->ai_count) { /* done */
d = readw(devpriv->las1 + LAS1_ADC_FIFO);
continue;
}
......@@ -669,8 +669,8 @@ static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s,
if (!comedi_buf_put(s->async, sample))
return -1;
if (devpriv->aiCount > 0) /* < 0, means read forever */
devpriv->aiCount--;
if (devpriv->ai_count > 0) /* < 0, means read forever */
devpriv->ai_count--;
}
return 0;
}
......@@ -686,7 +686,7 @@ static int ai_read_dregs(struct comedi_device *dev, struct comedi_subdevice *s)
short sample;
s16 d = readw(devpriv->las1 + LAS1_ADC_FIFO);
if (0 == devpriv->aiCount) { /* done */
if (0 == devpriv->ai_count) { /* done */
continue; /* read rest */
}
......@@ -700,8 +700,8 @@ static int ai_read_dregs(struct comedi_device *dev, struct comedi_subdevice *s)
if (!comedi_buf_put(s->async, sample))
return -1;
if (devpriv->aiCount > 0) /* < 0, means read forever */
devpriv->aiCount--;
if (devpriv->ai_count > 0) /* < 0, means read forever */
devpriv->ai_count--;
}
return 0;
}
......@@ -746,7 +746,7 @@ static irqreturn_t rtd_interrupt(int irq, void *d)
if (ai_read_n(dev, s, devpriv->fifosz / 2) < 0)
goto xfer_abort;
if (0 == devpriv->aiCount)
if (0 == devpriv->ai_count)
goto xfer_done;
comedi_event(dev, s);
......@@ -756,7 +756,7 @@ static irqreturn_t rtd_interrupt(int irq, void *d)
if (ai_read_n(dev, s, devpriv->xfer_count) < 0)
goto xfer_abort;
if (0 == devpriv->aiCount)
if (0 == devpriv->ai_count)
goto xfer_done;
comedi_event(dev, s);
......@@ -776,7 +776,7 @@ static irqreturn_t rtd_interrupt(int irq, void *d)
xfer_abort:
writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR);
s->async->events |= COMEDI_CB_ERROR;
devpriv->aiCount = 0; /* stop and don't transfer any more */
devpriv->ai_count = 0; /* stop and don't transfer any more */
/* fall into xfer_done */
xfer_done:
......@@ -786,7 +786,7 @@ static irqreturn_t rtd_interrupt(int irq, void *d)
writel(0, devpriv->las0 + LAS0_ADC_CONVERSION);
writew(0, devpriv->las0 + LAS0_IT);
if (devpriv->aiCount > 0) { /* there shouldn't be anything left */
if (devpriv->ai_count > 0) { /* there shouldn't be anything left */
fifo_status = readl(devpriv->las0 + LAS0_ADC);
ai_read_dregs(dev, s); /* read anything left in FIFO */
}
......@@ -1056,15 +1056,15 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
/* First, setup when to stop */
switch (cmd->stop_src) {
case TRIG_COUNT: /* stop after N scans */
devpriv->aiCount = cmd->stop_arg * cmd->chanlist_len;
devpriv->ai_count = cmd->stop_arg * cmd->chanlist_len;
if ((devpriv->xfer_count > 0)
&& (devpriv->xfer_count > devpriv->aiCount)) {
devpriv->xfer_count = devpriv->aiCount;
&& (devpriv->xfer_count > devpriv->ai_count)) {
devpriv->xfer_count = devpriv->ai_count;
}
break;
case TRIG_NONE: /* stop when cancel is called */
devpriv->aiCount = -1; /* read forever */
devpriv->ai_count = -1; /* read forever */
break;
}
......@@ -1136,7 +1136,7 @@ static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
writel(0, devpriv->las0 + LAS0_PACER); /* stop pacer */
writel(0, devpriv->las0 + LAS0_ADC_CONVERSION);
writew(0, devpriv->las0 + LAS0_IT);
devpriv->aiCount = 0; /* stop and don't transfer any more */
devpriv->ai_count = 0; /* stop and don't transfer any more */
status = readw(devpriv->las0 + LAS0_IT);
overrun = readl(devpriv->las0 + LAS0_OVERRUN) & 0xffff;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册