summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-06-18 13:24:05 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-24 15:51:03 -0700
commit021314f82405594344b857e13e0493e11dad7298 (patch)
tree9efbc0b5dd1ab0248b4f21003dbb7983ee37859f /drivers/staging/comedi
parentc87e1f26054388b661298a61e906a03fa2cd193e (diff)
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: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/pcmuio.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c
index e21594bde226..b942b0a51bab 100644
--- a/drivers/staging/comedi/drivers/pcmuio.c
+++ b/drivers/staging/comedi/drivers/pcmuio.c
@@ -162,7 +162,6 @@ struct pcmuio_subdev_private {
struct pcmuio_private {
struct {
- unsigned long iobase;
unsigned int irq;
spinlock_t spinlock;
} asics[MAX_ASICS];
@@ -405,7 +404,7 @@ static int pcmuio_handle_asic_interrupt(struct comedi_device *dev, int asic)
{
struct pcmuio_private *devpriv = dev->private;
struct pcmuio_subdev_private *subpriv;
- unsigned long iobase = devpriv->asics[asic].iobase;
+ unsigned long iobase = dev->iobase + (asic * ASIC_IOSIZE);
unsigned triggered = 0;
int got1 = 0;
unsigned long flags;
@@ -675,10 +674,8 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return -ENOMEM;
dev->private = devpriv;
- for (asic = 0; asic < MAX_ASICS; ++asic) {
- devpriv->asics[asic].iobase = dev->iobase + asic * ASIC_IOSIZE;
+ for (asic = 0; asic < MAX_ASICS; ++asic)
spin_lock_init(&devpriv->asics[asic].spinlock);
- }
n_subdevs = board->num_asics * 2;
devpriv->sprivs = kcalloc(n_subdevs,
@@ -718,8 +715,8 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
++asic;
thisasic_chanct = 0;
}
- subpriv->iobases[byte_no] =
- devpriv->asics[asic].iobase + port;
+ subpriv->iobases[byte_no] = dev->iobase +
+ (asic * ASIC_IOSIZE) + port;
if (thisasic_chanct <
CHANS_PER_PORT * INTR_PORTS_PER_ASIC