Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317100
b: refs/heads/master
c: bf4683b
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent a6194ed commit f1a50cf
Show file tree
Hide file tree
Showing 2 changed files with 7 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: d493f213ab2bfcc41792f904abee75ecfd6afc10
refs/heads/master: bf4683bdbdfafc02f5f4d3170efcd25ff9f00c6b
13 changes: 6 additions & 7 deletions trunk/drivers/staging/comedi/drivers/comedi_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ struct waveform_board {

#define N_CHANS 8

#define thisboard ((const struct waveform_board *)dev->board_ptr)

/* Data unique to this driver */
struct waveform_private {
struct timer_list timer;
Expand Down Expand Up @@ -429,12 +427,13 @@ static int waveform_ao_insn_write(struct comedi_device *dev,
static int waveform_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
const struct waveform_board *board = comedi_board(dev);
struct comedi_subdevice *s;
int amplitude = it->options[0];
int period = it->options[1];
int i;

dev->board_name = thisboard->name;
dev->board_name = board->name;

if (alloc_private(dev, sizeof(struct waveform_private)) < 0)
return -ENOMEM;
Expand All @@ -457,8 +456,8 @@ static int waveform_attach(struct comedi_device *dev,
/* analog input subdevice */
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_CMD_READ;
s->n_chan = thisboard->ai_chans;
s->maxdata = (1 << thisboard->ai_bits) - 1;
s->n_chan = board->ai_chans;
s->maxdata = (1 << board->ai_bits) - 1;
s->range_table = &waveform_ai_ranges;
s->len_chanlist = s->n_chan * 2;
s->insn_read = waveform_ai_insn_read;
Expand All @@ -471,8 +470,8 @@ static int waveform_attach(struct comedi_device *dev,
/* analog output subdevice (loopback) */
s->type = COMEDI_SUBD_AO;
s->subdev_flags = SDF_WRITEABLE | SDF_GROUND;
s->n_chan = thisboard->ai_chans;
s->maxdata = (1 << thisboard->ai_bits) - 1;
s->n_chan = board->ai_chans;
s->maxdata = (1 << board->ai_bits) - 1;
s->range_table = &waveform_ai_ranges;
s->len_chanlist = s->n_chan * 2;
s->insn_write = waveform_ao_insn_write;
Expand Down

0 comments on commit f1a50cf

Please sign in to comment.