Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325465
b: refs/heads/master
c: 2a29edf
h: refs/heads/master
i:
  325463: fe55ea8
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 21, 2012
1 parent b0c6fa4 commit 49a4818
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 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: 43a352760e6c1c073c12f6e21d02b789525e677e
refs/heads/master: 2a29edf69807a43ad7594554cea4def755443103
21 changes: 12 additions & 9 deletions trunk/drivers/staging/comedi/drivers/s526.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,22 +145,25 @@ struct s526_private {
};

static int s526_gpct_rinsn(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_insn *insn,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
unsigned int chan = CR_CHAN(insn->chanspec);
unsigned short datalow;
unsigned short datahigh;
unsigned long chan_iobase = dev->iobase + chan * 8;
unsigned int lo;
unsigned int hi;
int i;

/* Read the low word first */
for (i = 0; i < insn->n; i++) {
datalow = inw(dev->iobase + REG_C0L + chan * 8);
datahigh = inw(dev->iobase + REG_C0H + chan * 8);
data[i] = (int)(datahigh & 0x00FF);
data[i] = (data[i] << 16) | (datalow & 0xFFFF);
/* Read the low word first */
lo = inw(chan_iobase + REG_C0L) & 0xffff;
hi = inw(chan_iobase + REG_C0H) & 0xff;

data[i] = (hi << 16) | lo;
}
return i;

return insn->n;
}

static int s526_gpct_insn_config(struct comedi_device *dev,
Expand Down

0 comments on commit 49a4818

Please sign in to comment.