Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324665
b: refs/heads/master
c: 8432eb3
h: refs/heads/master
i:
  324663: 1cba4bb
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Sep 4, 2012
1 parent 64aa76b commit c670e82
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3b85aa6378b2a978f7bf38096c6309e771b218b0
refs/heads/master: 8432eb35a924440e21bccd965009b101a37a3aad
12 changes: 12 additions & 0 deletions trunk/drivers/staging/comedi/drivers/das08.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,17 @@ static void das08_ao_set_data(struct comedi_device *dev,
}
}

static void das08_ao_initialize(struct comedi_device *dev,
struct comedi_subdevice *s)
{
int n;
unsigned int data;

data = s->maxdata / 2; /* should be about 0 volts */
for (n = 0; n < s->n_chan; n++)
das08_ao_set_data(dev, n, data);
}

static int das08_ao_winsn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
Expand Down Expand Up @@ -665,6 +676,7 @@ int das08_common_attach(struct comedi_device *dev, unsigned long iobase)
s->maxdata = (1 << thisboard->ao_nbits) - 1;
s->range_table = &range_bipolar5;
s->insn_write = das08_ao_winsn;
das08_ao_initialize(dev, s);
} else {
s->type = COMEDI_SUBD_UNUSED;
}
Expand Down

0 comments on commit c670e82

Please sign in to comment.