Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324892
b: refs/heads/master
c: a9c6f0b
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 4707991 commit 135a6a3
Show file tree
Hide file tree
Showing 2 changed files with 11 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: 3d30dca5738c87bc4c61d9530893b122e6c6a89f
refs/heads/master: a9c6f0bb2c06c5bdbb16c7f063811e977ce04892
17 changes: 10 additions & 7 deletions trunk/drivers/staging/comedi/drivers/ni_65xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ static int ni_65xx_dio_insn_bits(struct comedi_device *dev,
static irqreturn_t ni_65xx_interrupt(int irq, void *d)
{
struct comedi_device *dev = d;
struct comedi_subdevice *s = dev->subdevices + 2;
struct comedi_subdevice *s = &dev->subdevices[2];
unsigned int status;

status = readb(private(dev)->mite->daq_io_addr + Change_Status);
Expand Down Expand Up @@ -678,7 +678,7 @@ static int ni_65xx_attach(struct comedi_device *dev,
if (ret)
return ret;

s = dev->subdevices + 0;
s = &dev->subdevices[0];
if (board(dev)->num_di_ports) {
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE;
Expand All @@ -696,7 +696,7 @@ static int ni_65xx_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_UNUSED;
}

s = dev->subdevices + 1;
s = &dev->subdevices[1];
if (board(dev)->num_do_ports) {
s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
Expand All @@ -713,7 +713,7 @@ static int ni_65xx_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_UNUSED;
}

s = dev->subdevices + 2;
s = &dev->subdevices[2];
if (board(dev)->num_dio_ports) {
s->type = COMEDI_SUBD_DIO;
s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
Expand All @@ -737,7 +737,7 @@ static int ni_65xx_attach(struct comedi_device *dev,
s->type = COMEDI_SUBD_UNUSED;
}

s = dev->subdevices + 3;
s = &dev->subdevices[3];
dev->read_subdev = s;
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE | SDF_CMD_READ;
Expand Down Expand Up @@ -791,10 +791,13 @@ static void ni_65xx_detach(struct comedi_device *dev)
if (dev->irq)
free_irq(dev->irq, dev);
if (private(dev)) {
struct comedi_subdevice *s;
unsigned i;

for (i = 0; i < dev->n_subdevices; ++i) {
kfree(dev->subdevices[i].private);
dev->subdevices[i].private = NULL;
s = &dev->subdevices[i];
kfree(s->private);
s->private = NULL;
}
if (private(dev)->mite)
mite_unsetup(private(dev)->mite);
Expand Down

0 comments on commit 135a6a3

Please sign in to comment.