[PATCH 10/13] staging: comedi: pcmuio: docuemnt asics[].spinlock

H Hartley Sweeten hsweeten at visionengravers.com
Wed Jul 24 18:49:29 UTC 2013


Add a comment about what this spinlock is used for. Also, add
comments for two helper functions that do not need to lock/unlock
the spinlock.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 drivers/staging/comedi/drivers/pcmuio.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c
index 9e746a5..b7aa9e5 100644
--- a/drivers/staging/comedi/drivers/pcmuio.c
+++ b/drivers/staging/comedi/drivers/pcmuio.c
@@ -130,7 +130,7 @@ static const struct pcmuio_board pcmuio_boards[] = {
 struct pcmuio_private {
 	struct {
 		spinlock_t pagelock;	/* protect r/w of page registers */
-		spinlock_t spinlock;
+		spinlock_t spinlock;	/* protect member variables */
 		int enabled_mask;
 		int active;
 		int stop_count;
@@ -299,6 +299,7 @@ static void pcmuio_reset(struct comedi_device *dev)
 	}
 }
 
+/* asics[].spinlock is already locked */
 static void pcmuio_stop_intr(struct comedi_device *dev,
 			     struct comedi_subdevice *s)
 {
@@ -401,6 +402,7 @@ static irqreturn_t pcmuio_interrupt(int irq, void *d)
 	return handled ? IRQ_HANDLED : IRQ_NONE;
 }
 
+/* asics[].spinlock is already locked */
 static int pcmuio_start_intr(struct comedi_device *dev,
 			     struct comedi_subdevice *s)
 {
-- 
1.8.3.2



More information about the devel mailing list