]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: s626: remove 'my_event_bits' from encoder private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 20 Jun 2014 20:29:01 +0000 (13:29 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:11:18 +0000 (20:11 -0400)
commit594ea02099be886ea17ec3f47b03e99d01d3f661
treee079e3780ae6516a774d889656496829df4b7e54
parent58bc86ca1377e04acd64c04b6fb26ea38623d143
staging: comedi: s626: remove 'my_event_bits' from encoder private data

This array in the encoder private data just makes the driver harder to
follow.

The S626_EVBITS() macro is used to initialize the member in the declaration.
This macro creates a array of four values, based on the encoder channel, that
are used to mask and set the private data 'counter_int_enabs' member. The
values are created using the S626_OVERMASK() and S626_INDXMASK() macros using
the encoder channel number.

Remove the 'my_event_bits' member from the encoder private data as well
as the S626_EVBITS() macro. Refactor the code to use the S626_OVERMASK() and
S626_INDXMASK() macros directly.

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