Commit 83d55bd0 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcmmio: rename 'spinlock' in the private data

This spinlock_t is meant to protect the page registers in the asic.
Rename it to make this clear.
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 20218e6a
...@@ -254,7 +254,7 @@ struct pcmmio_subdev_private { ...@@ -254,7 +254,7 @@ struct pcmmio_subdev_private {
* feel free to suggest moving the variable to the struct comedi_device struct. * feel free to suggest moving the variable to the struct comedi_device struct.
*/ */
struct pcmmio_private { struct pcmmio_private {
spinlock_t spinlock; spinlock_t pagelock; /* protects the page registers */
struct pcmmio_subdev_private *sprivs; struct pcmmio_subdev_private *sprivs;
unsigned int ao_readback[8]; unsigned int ao_readback[8];
...@@ -412,7 +412,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d) ...@@ -412,7 +412,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
/* it is an interrupt for ASIC #asic */ /* it is an interrupt for ASIC #asic */
unsigned char int_pend; unsigned char int_pend;
spin_lock_irqsave(&devpriv->spinlock, flags); spin_lock_irqsave(&devpriv->pagelock, flags);
int_pend = inb(dev->iobase + PCMMIO_INT_PENDING_REG); int_pend = inb(dev->iobase + PCMMIO_INT_PENDING_REG);
int_pend &= 0x07; int_pend &= 0x07;
...@@ -446,7 +446,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d) ...@@ -446,7 +446,7 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
++got1; ++got1;
} }
spin_unlock_irqrestore(&devpriv->spinlock, flags); spin_unlock_irqrestore(&devpriv->pagelock, flags);
if (triggered) { if (triggered) {
struct comedi_subdevice *s; struct comedi_subdevice *s;
...@@ -941,7 +941,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -941,7 +941,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (!devpriv) if (!devpriv)
return -ENOMEM; return -ENOMEM;
spin_lock_init(&devpriv->spinlock); spin_lock_init(&devpriv->pagelock);
chans_left = CHANS_PER_ASIC * 1; chans_left = CHANS_PER_ASIC * 1;
n_dio_subdevs = CALC_N_DIO_SUBDEVS(chans_left); n_dio_subdevs = CALC_N_DIO_SUBDEVS(chans_left);
......
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