Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376033
b: refs/heads/master
c: bd304a7
h: refs/heads/master
i:
  376031: 4ab5311
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed May 13, 2013
1 parent 1f2b194 commit d114251
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4efc4bbdc1602d887d784be629a7a4efbf6b6e19
refs/heads/master: bd304a736afd99cc38bad4d1628e8e2d05d308d5
20 changes: 10 additions & 10 deletions trunk/drivers/staging/comedi/drivers/ni_mio_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,11 @@ static int ni_gpct_insn_read(struct comedi_device *dev,
static int ni_gpct_insn_config(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data);
#ifdef PCIDMA
static int ni_gpct_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
static int ni_gpct_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd);
#endif
static int ni_gpct_cancel(struct comedi_device *dev,
struct comedi_subdevice *s);
static void handle_gpct_interrupt(struct comedi_device *dev,
Expand Down Expand Up @@ -4617,9 +4619,7 @@ static int ni_E_init(struct comedi_device *dev)
for (j = 0; j < NUM_GPCT; ++j) {
s = &dev->subdevices[NI_GPCT_SUBDEV(j)];
s->type = COMEDI_SUBD_COUNTER;
s->subdev_flags =
SDF_READABLE | SDF_WRITABLE | SDF_LSAMPL | SDF_CMD_READ
/* | SDF_CMD_WRITE */ ;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_LSAMPL;
s->n_chan = 3;
if (board->reg_type & ni_reg_m_series_mask)
s->maxdata = 0xffffffff;
Expand All @@ -4628,11 +4628,14 @@ static int ni_E_init(struct comedi_device *dev)
s->insn_read = &ni_gpct_insn_read;
s->insn_write = &ni_gpct_insn_write;
s->insn_config = &ni_gpct_insn_config;
#ifdef PCIDMA
s->subdev_flags |= SDF_CMD_READ /* | SDF_CMD_WRITE */;
s->do_cmd = &ni_gpct_cmd;
s->len_chanlist = 1;
s->do_cmdtest = &ni_gpct_cmdtest;
s->cancel = &ni_gpct_cancel;
s->async_dma_dir = DMA_BIDIRECTIONAL;
#endif
s->private = &devpriv->counter_dev->counters[j];

devpriv->counter_dev->counters[j].chip_index = 0;
Expand Down Expand Up @@ -5216,10 +5219,10 @@ static int ni_gpct_insn_write(struct comedi_device *dev,
return ni_tio_winsn(counter, insn, data);
}

#ifdef PCIDMA
static int ni_gpct_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{
int retval;
#ifdef PCIDMA
struct ni_gpct *counter = s->private;
/* const struct comedi_cmd *cmd = &s->async->cmd; */

Expand All @@ -5233,23 +5236,20 @@ static int ni_gpct_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
ni_tio_acknowledge_and_confirm(counter, NULL, NULL, NULL, NULL);
ni_e_series_enable_second_irq(dev, counter->counter_index, 1);
retval = ni_tio_cmd(counter, s->async);
#else
retval = -ENOTSUPP;
#endif
return retval;
}
#endif

#ifdef PCIDMA
static int ni_gpct_cmdtest(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_cmd *cmd)
{
#ifdef PCIDMA
struct ni_gpct *counter = s->private;

return ni_tio_cmdtest(counter, cmd);
#else
return -ENOTSUPP;
#endif
}
#endif

static int ni_gpct_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
{
Expand Down

0 comments on commit d114251

Please sign in to comment.