Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317084
b: refs/heads/master
c: 449b683
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent 5274e15 commit cbaeb72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: 2fbffee0604fd3f6f9e3aa56e3fe1aa061a32ca6
refs/heads/master: 449b683c6b4f92af648447f9eb449fd52ce6d56b
10 changes: 5 additions & 5 deletions trunk/drivers/staging/comedi/drivers/pcmad.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ struct pcmad_board_struct {
int n_ai_bits;
};

#define this_board ((const struct pcmad_board_struct *)(dev->board_ptr))

struct pcmad_priv_struct {
int differential;
int twos_comp;
Expand All @@ -72,6 +70,7 @@ static int pcmad_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
{
const struct pcmad_board_struct *board = comedi_board(dev);
int i;
int chan;
int n;
Expand All @@ -89,7 +88,7 @@ static int pcmad_ai_insn_read(struct comedi_device *dev,
data[n] |= (inb(dev->iobase + PCMAD_MSB) << 8);

if (devpriv->twos_comp)
data[n] ^= (1 << (this_board->n_ai_bits - 1));
data[n] ^= (1 << (board->n_ai_bits - 1));
}

return n;
Expand All @@ -104,6 +103,7 @@ static int pcmad_ai_insn_read(struct comedi_device *dev,
*/
static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
const struct pcmad_board_struct *board = comedi_board(dev);
int ret;
struct comedi_subdevice *s;
unsigned long iobase;
Expand All @@ -125,15 +125,15 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret < 0)
return ret;

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

s = dev->subdevices + 0;
s->type = COMEDI_SUBD_AI;
s->subdev_flags = SDF_READABLE | AREF_GROUND;
s->n_chan = 16; /* XXX */
s->len_chanlist = 1;
s->insn_read = pcmad_ai_insn_read;
s->maxdata = (1 << this_board->n_ai_bits) - 1;
s->maxdata = (1 << board->n_ai_bits) - 1;
s->range_table = &range_unknown;

return 0;
Expand Down

0 comments on commit cbaeb72

Please sign in to comment.