]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
staging: comedi: ni_daq_700: remove the CALLBACK_* code
authorH Hartley Sweeten <hartleys@visionengravers.com>
Fri, 22 Jun 2012 23:28:33 +0000 (16:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jun 2012 03:55:07 +0000 (20:55 -0700)
commit1de02225358988e8fd48d1dc3fd12336bbae258a
treeffcc61017f8731faded894cd375ac0683a2a1e51
parent54be9353682914693074078d203407806f8f3f34
staging: comedi: ni_daq_700: remove the CALLBACK_* code

This driver was originally copied from the 8255 driver. The 8255
uses a callback function to handle the io operations to the device.
In this driver, the callback adds unneeded complexity.

The CALLBACK_ARG for this driver is always 'dev->iobase' and the
CALLBACK_FUNC is always 'subdev_700_cb'.

The callback function is also overly complex for this driver.
It takes a 'dir' parameter to determine if the io is a write or
read, a 'port' parameter that is not used, a 'data' parameter
that is only used for writes, and an 'arg' which is the iobase
of the device.

Unwind all of it and just put the outb()/inb() call in the code
where needed.

This allows getting rid of the private data completely. Refactor
the code based on it's removal.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_daq_700.c