On 22/01/15 17:07, Hartley Sweeten wrote:
On Thursday, January 22, 2015 3:31 AM, Ian Abbott wrote:
On 22/01/15 00:22, H Hartley Sweeten wrote:
A couple cleanup patches for the vmk80xx driver.

H Hartley Sweeten (2):
    staging: comedi: vmk80xx: GPCT_RESET is not an (*insn_config) instruction
    staging: comedi: vmk80xx: tidy up vmk80xx_cnt_insn_config()

   drivers/staging/comedi/drivers/vmk80xx.c | 46 
++++++++++++++------------------
   1 file changed, 20 insertions(+), 26 deletions(-)


Reviewed-by: Ian Abbott <abbo...@mev.co.uk>

Ian,

The only GPCT_* define from comedi.h that is used is GPCT_RESET. That one is
Only used in some #if 0'ed out code in ni_mio_comon.c and that code would
not compile if it was enabled.

Do you see any problems in just removing those defines from comedi.h?

Specifically I'm referring to this block:

/* counters -- these are arbitrary values */
#define GPCT_RESET              0x0001
#define GPCT_SET_SOURCE         0x0002
#define GPCT_SET_GATE           0x0004
#define GPCT_SET_DIRECTION      0x0008
#define GPCT_SET_OPERATION      0x0010
#define GPCT_ARM                0x0020
#define GPCT_DISARM             0x0040
#define GPCT_GET_INT_CLK_FRQ    0x0080

#define GPCT_INT_CLOCK          0x0001
#define GPCT_EXT_PIN            0x0002
#define GPCT_NO_GATE            0x0004
#define GPCT_UP                 0x0008
#define GPCT_DOWN               0x0010
#define GPCT_HWUD               0x0020
#define GPCT_SIMPLE_EVENT       0x0040
#define GPCT_SINGLE_PERIOD      0x0080
#define GPCT_SINGLE_PW          0x0100
#define GPCT_CONT_PULSE_OUT     0x0200
#define GPCT_SINGLE_PULSE_OUT   0x0400

Most of that is irrelevant cruft although GPCT_RESET and GPCT_SET_OPERATION are still used by me4000.c like an insn_config instruction type. It needs changing to support the proper insn_config instruction types, but should still support the old ones for backwards compatibility.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbo...@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to