Skip to content

Commit

Permalink
staging: comedi: rtd520: remove code in #if 0/#endif blocks
Browse files Browse the repository at this point in the history
All the #if 0'ed out code is either debug or incomplete. Just remove
it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 30, 2012
1 parent 825ca08 commit 5133f12
Showing 1 changed file with 1 addition and 40 deletions.
41 changes: 1 addition & 40 deletions drivers/staging/comedi/drivers/rtd520.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,15 +566,8 @@ static int ai_read_n(struct comedi_device *dev, struct comedi_subdevice *s,
d = readw(devpriv->las1 + LAS1_ADC_FIFO);
continue;
}
#if 0
if (!(readl(devpriv->las0 + LAS0_ADC) & FS_ADC_NOT_EMPTY)) {
DPRINTK("comedi: READ OOPS on %d of %d\n", ii + 1,
count);
break;
}
#endif
d = readw(devpriv->las1 + LAS1_ADC_FIFO);

d = readw(devpriv->las1 + LAS1_ADC_FIFO);
d = d >> 3; /* low 3 bits are marker lines */
if (CHAN_ARRAY_TEST(devpriv->chanBipolar, s->async->cur_chan)) {
/* convert to comedi unsigned data */
Expand Down Expand Up @@ -752,18 +745,6 @@ static irqreturn_t rtd_interrupt(int irq, /* interrupt number (ignored) */
return IRQ_HANDLED;
}

#if 0
/*
return the number of samples available
*/
static int rtd_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
{
/* TODO: This needs to mask interrupts, read_dregs, and then re-enable */
/* Not sure what to do if DMA is active */
return s->async->buf_write_count - s->async->buf_read_count;
}
#endif

/*
cmdtest tests a particular command to see if it is valid.
Using the cmdtest ioctl, a user can create a valid cmd
Expand Down Expand Up @@ -884,12 +865,6 @@ static int rtd_ai_cmdtest(struct comedi_device *dev,
}
}

#if 0
if (cmd->scan_end_arg != cmd->chanlist_len) {
cmd->scan_end_arg = cmd->chanlist_len;
err++;
}
#endif
if (cmd->stop_src == TRIG_COUNT) {
/* TODO check for rounding error due to counter wrap */

Expand Down Expand Up @@ -1362,7 +1337,6 @@ static void rtd_pci_latency_quirk(struct comedi_device *dev,
{
unsigned char pci_latency;
u16 revision;
/*uint32_t epld_version; */

pci_read_config_word(pcidev, PCI_REVISION_ID, &revision);
DPRINTK("%s: PCI revision %d.\n", dev->board_name, revision);
Expand All @@ -1376,18 +1350,6 @@ static void rtd_pci_latency_quirk(struct comedi_device *dev,
} else {
DPRINTK("rtd520: PCI latency = %d\n", pci_latency);
}

#if 0
/*
* Undocumented EPLD version (doesn't match RTD driver results)
*/
DPRINTK("rtd520: Reading epld from %p\n", devpriv->las0 + 0);
epld_version = readl(devpriv->las0 + 0);
if ((epld_version & 0xF0) >> 4 == 0x0F)
DPRINTK("rtd520: pre-v8 EPLD. (%x)\n", epld_version);
else
DPRINTK("rtd520: EPLD version %x.\n", epld_version >> 4);
#endif
}

static const void *rtd_find_boardinfo(struct comedi_device *dev,
Expand Down Expand Up @@ -1460,7 +1422,6 @@ static int rtd_attach_pci(struct comedi_device *dev, struct pci_dev *pcidev)
s->do_cmd = rtd_ai_cmd;
s->do_cmdtest = rtd_ai_cmdtest;
s->cancel = rtd_ai_cancel;
/* s->poll = rtd_ai_poll; *//* not ready yet */

s = &dev->subdevices[1];
/* analog output subdevice */
Expand Down

0 comments on commit 5133f12

Please sign in to comment.