Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 324904
b: refs/heads/master
c: d533ef0
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 5421eef commit 70a7d5d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: af77727a2b14b0c475709cfa200e7a25045a2a82
refs/heads/master: d533ef070d0af7816616499fc4bf0eb36dfd63a6
15 changes: 9 additions & 6 deletions trunk/drivers/staging/comedi/drivers/pcl724.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ static int subdev_8255mapped_cb(int dir, int port, int data,
static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
const struct pcl724_board *board = comedi_board(dev);
struct comedi_subdevice *s;
unsigned long iobase;
unsigned int iorange;
int ret, i, n_subdevices;
Expand Down Expand Up @@ -161,14 +162,13 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return ret;

for (i = 0; i < dev->n_subdevices; i++) {
s = &dev->subdevices[i];
if (board->is_pet48) {
subdev_8255_init(dev, dev->subdevices + i,
subdev_8255mapped_cb,
subdev_8255_init(dev, s, subdev_8255mapped_cb,
(unsigned long)(dev->iobase +
i * 0x1000));
} else
subdev_8255_init(dev, dev->subdevices + i,
subdev_8255_cb,
subdev_8255_init(dev, s, subdev_8255_cb,
(unsigned long)(dev->iobase +
SIZE_8255 * i));
}
Expand All @@ -179,10 +179,13 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
static void pcl724_detach(struct comedi_device *dev)
{
const struct pcl724_board *board = comedi_board(dev);
struct comedi_subdevice *s;
int i;

for (i = 0; i < dev->n_subdevices; i++)
subdev_8255_cleanup(dev, dev->subdevices + i);
for (i = 0; i < dev->n_subdevices; i++) {
s = &dev->subdevices[i];
subdev_8255_cleanup(dev, s);
}
#ifdef PCL724_IRQ
if (dev->irq)
free_irq(dev->irq, dev);
Expand Down

0 comments on commit 70a7d5d

Please sign in to comment.