staging: comedi: pcmuio: spinlock protect pcmuio_{write, read}()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 5 Dec 2013 23:54:04 +0000 (16:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Dec 2013 21:10:02 +0000 (13:10 -0800)
commit099ec87df0ff7c2c66173876a9b8910aafb7ca39
tree21fbb1ff6cab93f23ae7f5adfe6884d29e490a98
parent04426acfb86ad10968340771bb15f6074e12912f
staging: comedi: pcmuio: spinlock protect pcmuio_{write, read}()

Currently only the pcmuio_handle_asic_interrupt() function uses the
spinlock in the private data to protect the read of the paged interrupt
id registers. All accesses to the paged registers should be protected
to ensure that the page is not changed until the access is complete.
Move the lock/unlock into the pcmuio_{write,read}() functions to make
sure the access completes correctly. Rename the spinlock to variable
to clarify its use.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/pcmuio.c