]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: comedi: mite: remove mite member 'channel_allocated'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 2 May 2016 17:11:41 +0000 (10:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 May 2016 21:11:15 +0000 (14:11 -0700)
commit48a73aedd7e47140bec5ccab17d4aa8604f76000
tree33803187f8f4de9199a3101f9046f886263dba15
parentab55b5c9f225d32a5355f7c799ab09c7fae5456d
staging: comedi: mite: remove mite member 'channel_allocated'

An allocated mite_channel will have its 'ring' member initialized
to point to the mite_ring that will be used for DMA. A non-allocated
mite_channel will have a 'ring' member set to NULL, either by a
channel release or due to the initial kzalloc of the 'mite' struct.

Refactor the code to use the mite_chan->ring to detect in a channel
is allocated and remove the unnecessary member.

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