staging: comedi: s626: remove 'get_mode' callback from encoder private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 20 Jun 2014 20:28:59 +0000 (13:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:11:18 +0000 (20:11 -0400)
commit0a9844910c7dd5e6dfc630a69f7efc9ba261efcf
treec0deb61ff8c1ae9448b3b9ca70e5380bf2f8d9a1
parent26499b8bce111f5c33329de3a5af68f6044bdcb2
staging: comedi: s626: remove 'get_mode' callback from encoder private data

There are two functions used for the 'get_mode' callback. One is used for
the channel 0-2 encoders and the other for the channel 3-5 encoders.

Add a helper function, s626_get_mode(), that uses the encoder channel number
to determine which function to call.

Remove the then unnecessary 'get_mode' member from the encoder private data.

The 'get_mode' callbacks were not being used by the driver in any of the enabled
code. For now block the s626_get_mode() functions with '#ifdef unused' to prevent
a compiler warning.

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