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

staging: comedi: rtd520: remove intMask from private data

This variable in the private data is not necessary. Remove it.
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 360235af
...@@ -414,7 +414,6 @@ struct rtdPrivate { ...@@ -414,7 +414,6 @@ struct rtdPrivate {
/* shadow registers affect other registers, but can't be read back */ /* shadow registers affect other registers, but can't be read back */
/* The macros below update these on writes */ /* The macros below update these on writes */
u16 intMask; /* interrupt mask */
u16 intClearMask; /* interrupt clear mask */ u16 intClearMask; /* interrupt clear mask */
u8 utcCtrl[4]; /* crtl mode for 3 utc + read back */ u8 utcCtrl[4]; /* crtl mode for 3 utc + read back */
unsigned fifoLen; unsigned fifoLen;
...@@ -799,8 +798,7 @@ static irqreturn_t rtd_interrupt(int irq, /* interrupt number (ignored) */ ...@@ -799,8 +798,7 @@ static irqreturn_t rtd_interrupt(int irq, /* interrupt number (ignored) */
writel(0, devpriv->las0 + LAS0_PACER_STOP); writel(0, devpriv->las0 + LAS0_PACER_STOP);
writel(0, devpriv->las0 + LAS0_PACER); /* stop pacer */ writel(0, devpriv->las0 + LAS0_PACER); /* stop pacer */
writel(0, devpriv->las0 + LAS0_ADC_CONVERSION); writel(0, devpriv->las0 + LAS0_ADC_CONVERSION);
devpriv->intMask = 0; writew(0, devpriv->las0 + LAS0_IT);
writew(devpriv->intMask, devpriv->las0 + LAS0_IT);
if (devpriv->aiCount > 0) { /* there shouldn't be anything left */ if (devpriv->aiCount > 0) { /* there shouldn't be anything left */
fifoStatus = readl(devpriv->las0 + LAS0_ADC); fifoStatus = readl(devpriv->las0 + LAS0_ADC);
...@@ -998,8 +996,7 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -998,8 +996,7 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
writel(0, devpriv->las0 + LAS0_PACER_STOP); writel(0, devpriv->las0 + LAS0_PACER_STOP);
writel(0, devpriv->las0 + LAS0_PACER); /* stop pacer */ writel(0, devpriv->las0 + LAS0_PACER); /* stop pacer */
writel(0, devpriv->las0 + LAS0_ADC_CONVERSION); writel(0, devpriv->las0 + LAS0_ADC_CONVERSION);
devpriv->intMask = 0; writew(0, devpriv->las0 + LAS0_IT);
writew(devpriv->intMask, devpriv->las0 + LAS0_IT);
writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR); writel(0, devpriv->las0 + LAS0_ADC_FIFO_CLEAR);
writel(0, devpriv->las0 + LAS0_OVERRUN); writel(0, devpriv->las0 + LAS0_OVERRUN);
...@@ -1131,11 +1128,9 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1131,11 +1128,9 @@ static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
/* TODO: allow multiple interrupt sources */ /* TODO: allow multiple interrupt sources */
if (devpriv->transCount > 0) { /* transfer every N samples */ if (devpriv->transCount > 0) { /* transfer every N samples */
devpriv->intMask = IRQM_ADC_ABOUT_CNT; writew(IRQM_ADC_ABOUT_CNT, devpriv->las0 + LAS0_IT);
writew(devpriv->intMask, devpriv->las0 + LAS0_IT);
} else { /* 1/2 FIFO transfers */ } else { /* 1/2 FIFO transfers */
devpriv->intMask = IRQM_ADC_ABOUT_CNT; writew(IRQM_ADC_ABOUT_CNT, devpriv->las0 + LAS0_IT);
writew(devpriv->intMask, devpriv->las0 + LAS0_IT);
} }
/* BUG: start_src is ASSUMED to be TRIG_NOW */ /* BUG: start_src is ASSUMED to be TRIG_NOW */
...@@ -1157,8 +1152,7 @@ static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1157,8 +1152,7 @@ static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
writel(0, devpriv->las0 + LAS0_PACER_STOP); writel(0, devpriv->las0 + LAS0_PACER_STOP);
writel(0, devpriv->las0 + LAS0_PACER); /* stop pacer */ writel(0, devpriv->las0 + LAS0_PACER); /* stop pacer */
writel(0, devpriv->las0 + LAS0_ADC_CONVERSION); writel(0, devpriv->las0 + LAS0_ADC_CONVERSION);
devpriv->intMask = 0; writew(0, devpriv->las0 + LAS0_IT);
writew(devpriv->intMask, devpriv->las0 + LAS0_IT);
devpriv->aiCount = 0; /* stop and don't transfer any more */ devpriv->aiCount = 0; /* stop and don't transfer any more */
status = readw(devpriv->las0 + LAS0_IT); status = readw(devpriv->las0 + LAS0_IT);
overrun = readl(devpriv->las0 + LAS0_OVERRUN) & 0xffff; overrun = readl(devpriv->las0 + LAS0_OVERRUN) & 0xffff;
...@@ -1313,8 +1307,7 @@ static void rtd_reset(struct comedi_device *dev) ...@@ -1313,8 +1307,7 @@ static void rtd_reset(struct comedi_device *dev)
writel(0, devpriv->las0 + LAS0_BOARD_RESET); writel(0, devpriv->las0 + LAS0_BOARD_RESET);
udelay(100); /* needed? */ udelay(100); /* needed? */
writel(0, devpriv->lcfg + PLX_INTRCS_REG); writel(0, devpriv->lcfg + PLX_INTRCS_REG);
devpriv->intMask = 0; writew(0, devpriv->las0 + LAS0_IT);
writew(devpriv->intMask, devpriv->las0 + LAS0_IT);
devpriv->intClearMask = ~0; devpriv->intClearMask = ~0;
writew(devpriv->intClearMask, devpriv->las0 + LAS0_CLEAR); writew(devpriv->intClearMask, devpriv->las0 + LAS0_CLEAR);
readw(devpriv->las0 + LAS0_CLEAR); readw(devpriv->las0 + LAS0_CLEAR);
......
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