staging: comedi: dt9812: move the sempaphore used by the comedi_driver
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 14 May 2013 21:27:39 +0000 (14:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 May 2013 23:25:59 +0000 (16:25 -0700)
commiteb5a0a8ca5a9ee145c9c586083c63bff711c66d1
tree4ccd1e0ed3052cdfbea7f691ffbbecc6dade6ee5
parentfad1c32076ae8b82c7b62be5946f98596f7febeb
staging: comedi: dt9812: move the sempaphore used by the comedi_driver

The semaphore in the struct slot_dt9812 is used by the comedi_driver
when reading and writing to the usb device. It has no real association
with the 'slot'. The 'slot' is protected with a static semaphore in
the driver.

Move the semaphore into the comedi_device private data and initialize
it after the private data is allocated.

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/dt9812.c