Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354442
b: refs/heads/master
c: 8b3ec9f
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Feb 6, 2013
1 parent 3190c01 commit b4b8440
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 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: 658cd3ac2e31d637f50402611976bdaab74c28f8
refs/heads/master: 8b3ec9f155cf564e0f2320b6a895d8684f2874fe
36 changes: 19 additions & 17 deletions trunk/drivers/staging/comedi/drivers/vmk80xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ struct vmk80xx_board {
const struct comedi_lrange *range;
int ai_nchans;
unsigned int ai_maxdata;
__u8 ao_chans;
int ao_nchans;
__u8 di_chans;
__le16 cnt_bits;
__u8 pwm_chans;
Expand All @@ -175,7 +175,7 @@ static const struct vmk80xx_board vmk80xx_boardinfo[] = {
.range = &vmk8055_range,
.ai_nchans = 2,
.ai_maxdata = 0x00ff,
.ao_chans = 2,
.ao_nchans = 2,
.di_chans = 6,
.cnt_bits = 16,
.pwm_chans = 0,
Expand All @@ -187,7 +187,7 @@ static const struct vmk80xx_board vmk80xx_boardinfo[] = {
.range = &vmk8061_range,
.ai_nchans = 8,
.ai_maxdata = 0x03ff,
.ao_chans = 8,
.ao_nchans = 8,
.di_chans = 8,
.cnt_bits = 0,
.pwm_chans = 1,
Expand Down Expand Up @@ -585,9 +585,10 @@ static int vmk80xx_ai_insn_read(struct comedi_device *dev,
return n;
}

static int vmk80xx_ao_winsn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
static int vmk80xx_ao_insn_write(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct vmk80xx_private *devpriv = dev->private;
int chan;
Expand Down Expand Up @@ -629,9 +630,10 @@ static int vmk80xx_ao_winsn(struct comedi_device *dev,
return n;
}

static int vmk80xx_ao_rinsn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
static int vmk80xx_ao_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct vmk80xx_private *devpriv = dev->private;
int chan;
Expand Down Expand Up @@ -1204,15 +1206,15 @@ static int vmk80xx_attach_common(struct comedi_device *dev)

/* Analog output subdevice */
s = &dev->subdevices[1];
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
s->n_chan = boardinfo->ao_chans;
s->maxdata = 0x00ff;
s->range_table = boardinfo->range;
s->insn_write = vmk80xx_ao_winsn;
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
s->n_chan = boardinfo->ao_nchans;
s->maxdata = 0x00ff;
s->range_table = boardinfo->range;
s->insn_write = vmk80xx_ao_insn_write;
if (devpriv->model == VMK8061_MODEL) {
s->subdev_flags |= SDF_READABLE;
s->insn_read = vmk80xx_ao_rinsn;
s->subdev_flags |= SDF_READABLE;
s->insn_read = vmk80xx_ao_insn_read;
}

/* Digital input subdevice */
Expand Down

0 comments on commit b4b8440

Please sign in to comment.