Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364196
b: refs/heads/master
c: 2623477
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 23, 2013
1 parent 263872c commit df67771
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 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: 264601c231c9c9dec3da2c665c0b9cbec11d8c9e
refs/heads/master: 26234771c1a53b0a3bf69c161d79cd37c77ebd1a
23 changes: 12 additions & 11 deletions trunk/drivers/staging/comedi/drivers/das800.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,21 +648,22 @@ static int das800_do_insn_bits(struct comedi_device *dev,
unsigned int *data)
{
struct das800_private *devpriv = dev->private;
int wbits;
unsigned int mask = data[0];
unsigned int bits = data[1];
unsigned long irq_flags;

/* only set bits that have been masked */
data[0] &= 0xf;
wbits = devpriv->do_bits >> 4;
wbits &= ~data[0];
wbits |= data[0] & data[1];
devpriv->do_bits = wbits << 4;
if (mask) {
s->state &= ~mask;
s->state |= (bits & mask);
devpriv->do_bits = s->state << 4;

spin_lock_irqsave(&dev->spinlock, irq_flags);
das800_ind_write(dev, CONTROL1_INTE | devpriv->do_bits, CONTROL1);
spin_unlock_irqrestore(&dev->spinlock, irq_flags);
spin_lock_irqsave(&dev->spinlock, irq_flags);
das800_ind_write(dev, CONTROL1_INTE | devpriv->do_bits,
CONTROL1);
spin_unlock_irqrestore(&dev->spinlock, irq_flags);
}

data[1] = wbits;
data[1] = s->state;

return insn->n;
}
Expand Down

0 comments on commit df67771

Please sign in to comment.