Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249754
b: refs/heads/master
c: 9dc9989
h: refs/heads/master
v: v3
  • Loading branch information
J. Ali Harlow authored and Greg Kroah-Hartman committed May 18, 2011
1 parent 28ec841 commit 10089c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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: 85a2f34f4ecd48ce27f8ecc2d58ab66c05d55a9a
refs/heads/master: 9dc99895ef2bd96bad9674e4a0a6228c0690c912
6 changes: 2 additions & 4 deletions trunk/drivers/staging/comedi/drivers/vmk80xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ static int vmk80xx_di_rinsn(struct comedi_device *cdev,
else
inp = rx_buf[reg];

data[n] = ((inp & (1 << chan)) > 0);
data[n] = (inp >> chan) & 1;
}

up(&dev->limit_sem);
Expand Down Expand Up @@ -812,7 +812,6 @@ static int vmk80xx_do_rinsn(struct comedi_device *cdev,
struct vmk80xx_usb *dev = cdev->private;
int chan;
int reg;
int mask;
int n;

dbgvm("vmk80xx: %s\n", __func__);
Expand All @@ -825,15 +824,14 @@ static int vmk80xx_do_rinsn(struct comedi_device *cdev,
chan = CR_CHAN(insn->chanspec);

reg = VMK8061_DO_REG;
mask = 1 << chan;

dev->usb_tx_buf[0] = VMK8061_CMD_RD_DO;

for (n = 0; n < insn->n; n++) {
if (vmk80xx_read_packet(dev))
break;

data[n] = (dev->usb_rx_buf[reg] & mask) >> chan;
data[n] = (dev->usb_rx_buf[reg] >> chan) & 1;
}

up(&dev->limit_sem);
Expand Down

0 comments on commit 10089c7

Please sign in to comment.