Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363764
b: refs/heads/master
c: 7c00782
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Mar 26, 2013
1 parent 0340e05 commit afbbf7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 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: 198ac9dc7f0d06cd760d376c6a6c6217c5968d4a
refs/heads/master: 7c00782b1d4b9073ae38891d636302b1267285af
12 changes: 9 additions & 3 deletions trunk/drivers/staging/comedi/drivers/ni_labpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1539,10 +1539,16 @@ static int labpc_calib_insn_write(struct comedi_device *dev,
struct comedi_insn *insn,
unsigned int *data)
{
int channel = CR_CHAN(insn->chanspec);
unsigned int chan = CR_CHAN(insn->chanspec);

write_caldac(dev, channel, data[0]);
return 1;
/*
* Only write the last data value to the caldac. Preceding
* data would be overwritten anyway.
*/
if (insn->n > 0)
write_caldac(dev, chan, data[insn->n - 1]);

return insn->n;
}

static int labpc_calib_insn_read(struct comedi_device *dev,
Expand Down

0 comments on commit afbbf7e

Please sign in to comment.