Commit 021314f8 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcmuio: remove 'iobase' from private data

It's simple enough to calculate the iobase when needed. Remove this
member from the private data.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c87e1f26
...@@ -162,7 +162,6 @@ struct pcmuio_subdev_private { ...@@ -162,7 +162,6 @@ struct pcmuio_subdev_private {
struct pcmuio_private { struct pcmuio_private {
struct { struct {
unsigned long iobase;
unsigned int irq; unsigned int irq;
spinlock_t spinlock; spinlock_t spinlock;
} asics[MAX_ASICS]; } asics[MAX_ASICS];
...@@ -405,7 +404,7 @@ static int pcmuio_handle_asic_interrupt(struct comedi_device *dev, int asic) ...@@ -405,7 +404,7 @@ static int pcmuio_handle_asic_interrupt(struct comedi_device *dev, int asic)
{ {
struct pcmuio_private *devpriv = dev->private; struct pcmuio_private *devpriv = dev->private;
struct pcmuio_subdev_private *subpriv; struct pcmuio_subdev_private *subpriv;
unsigned long iobase = devpriv->asics[asic].iobase; unsigned long iobase = dev->iobase + (asic * ASIC_IOSIZE);
unsigned triggered = 0; unsigned triggered = 0;
int got1 = 0; int got1 = 0;
unsigned long flags; unsigned long flags;
...@@ -675,10 +674,8 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -675,10 +674,8 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return -ENOMEM; return -ENOMEM;
dev->private = devpriv; dev->private = devpriv;
for (asic = 0; asic < MAX_ASICS; ++asic) { for (asic = 0; asic < MAX_ASICS; ++asic)
devpriv->asics[asic].iobase = dev->iobase + asic * ASIC_IOSIZE;
spin_lock_init(&devpriv->asics[asic].spinlock); spin_lock_init(&devpriv->asics[asic].spinlock);
}
n_subdevs = board->num_asics * 2; n_subdevs = board->num_asics * 2;
devpriv->sprivs = kcalloc(n_subdevs, devpriv->sprivs = kcalloc(n_subdevs,
...@@ -718,8 +715,8 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -718,8 +715,8 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
++asic; ++asic;
thisasic_chanct = 0; thisasic_chanct = 0;
} }
subpriv->iobases[byte_no] = subpriv->iobases[byte_no] = dev->iobase +
devpriv->asics[asic].iobase + port; (asic * ASIC_IOSIZE) + port;
if (thisasic_chanct < if (thisasic_chanct <
CHANS_PER_PORT * INTR_PORTS_PER_ASIC CHANS_PER_PORT * INTR_PORTS_PER_ASIC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment