staging: comedi: amplc_pci230: replace `state` member with bitfields
authorIan Abbott <abbotti@mev.co.uk>
Mon, 1 Sep 2014 11:03:53 +0000 (12:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Sep 2014 18:21:32 +0000 (11:21 -0700)
commit4b0ff3dc5e3d86ada66afcaab46a766d326facd4
treed254a52827fcdd1684ed61bf0301ed347f1cf749
parentabea4ff48541348be06f6cd01d4db8badbbc2065
staging: comedi: amplc_pci230: replace `state` member with bitfields

The `state` member of `struct pci230_private` is used with the atomic
bit-op functions and has a couple of bits defined, `AI_CMD_STARTED` and
`AO_CMD_STARTED`.  Spin-locks are used to protect the clearing of these
bits and other stuff.  No special protection is used for setting these
bits.  Replace the `state` member with a couple of new, single-bit
bitfield members, `ai_cmd_started` and `ao_cmd_started` to save some
space.

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