staging: comedi: s626: remove 'get_enable' callback from encoder private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 20 Jun 2014 20:28:52 +0000 (13:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:11:17 +0000 (20:11 -0400)
commit4487502e8478b939445c15fffc836bdb44317a93
treebee1856f4516890d584384af6d48be4bf033d97b
parentc718f4a14f0cbc60eb72d8d6f39d0e3c5d1465d7
staging: comedi: s626: remove 'get_enable' callback from encoder private data

There are two functions used for the 'get_enable' callback, s626_get_enable_a()
function is used for the channel 0-2 encoders and s626_get_enable_b() is used
for the channel 3-5 encoders.

Refactor the two callbacks into a single s626_get_enable() function and use the
encoder channel number to handle the differenced.

Remove the then unnecessary 'get_enable' member and just call s626_set_enable()
directly.

The 'get_enable' callbacks were not being used by the driver. For now block the
s626_get_enable() function 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