Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325475
b: refs/heads/master
c: 1f5cc35
h: refs/heads/master
i:
  325473: 4cc3aa5
  325471: ae67860
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 21, 2012
1 parent 740ad0a commit 1c1c02e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 94174847ea41b1c2a44d997f2850530fb33f41cd
refs/heads/master: 1f5cc359158772304a92ee9c5682ca83416d2ba8
14 changes: 7 additions & 7 deletions trunk/drivers/staging/comedi/kcomedilib/kcomedilib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ int comedi_close(struct comedi_device *d)
}
EXPORT_SYMBOL(comedi_close);

static int comedi_do_insn(struct comedi_device *dev, struct comedi_insn *insn)
static int comedi_do_insn(struct comedi_device *dev,
struct comedi_insn *insn,
unsigned int *data)
{
struct comedi_subdevice *s;
int ret = 0;
Expand Down Expand Up @@ -115,11 +117,11 @@ static int comedi_do_insn(struct comedi_device *dev, struct comedi_insn *insn)

switch (insn->insn) {
case INSN_BITS:
ret = s->insn_bits(dev, s, insn, insn->data);
ret = s->insn_bits(dev, s, insn, data);
break;
case INSN_CONFIG:
/* XXX should check instruction length */
ret = s->insn_config(dev, s, insn, insn->data);
ret = s->insn_config(dev, s, insn, data);
break;
default:
ret = -EINVAL;
Expand All @@ -140,11 +142,10 @@ int comedi_dio_config(struct comedi_device *dev, unsigned int subdev,
memset(&insn, 0, sizeof(insn));
insn.insn = INSN_CONFIG;
insn.n = 1;
insn.data = &io;
insn.subdev = subdev;
insn.chanspec = CR_PACK(chan, 0, 0);

return comedi_do_insn(dev, &insn);
return comedi_do_insn(dev, &insn, &io);
}
EXPORT_SYMBOL(comedi_dio_config);

Expand All @@ -158,13 +159,12 @@ int comedi_dio_bitfield(struct comedi_device *dev, unsigned int subdev,
memset(&insn, 0, sizeof(insn));
insn.insn = INSN_BITS;
insn.n = 2;
insn.data = data;
insn.subdev = subdev;

data[0] = mask;
data[1] = *bits;

ret = comedi_do_insn(dev, &insn);
ret = comedi_do_insn(dev, &insn, data);

*bits = data[1];

Expand Down

0 comments on commit 1c1c02e

Please sign in to comment.