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

There are two functions used for the 'set_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_set_mode(), that uses the encoder channel number
to determine which function to call.

Remove the then unnecessary 'set_mode' member and just call s626_set_mode()
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