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)
commitf76d02f81f82b92831f54eaaccabf8608040d493
treee079e3780ae6516a774d889656496829df4b7e54
parentb35d6a38be9a5454e946ffea42cef92f25ca10de
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