From: H Hartley Sweeten Date: Fri, 1 May 2015 21:59:54 +0000 (-0700) Subject: staging: comedi: ni_stc.h: tidy up Misc_Command register and bits X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=68885d9e00c81c685ebfa3cbb850d065e0eaecf9;p=linux-beck.git staging: comedi: ni_stc.h: tidy up Misc_Command register and bits Rename the CamelCase. Use the BIT() macro to define the bits. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 2f7d64dc9b43..06c491d4dac3 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -1620,7 +1620,7 @@ static int ni_ai_reset(struct comedi_device *dev, struct comedi_subdevice *s) ni_clear_ai_fifo(dev); if (!devpriv->is_6143) - ni_writeb(dev, 0, Misc_Command); + ni_writeb(dev, NI_E_MISC_CMD_EXT_ATRIG, NI_E_MISC_CMD_REG); ni_stc_writew(dev, NISTC_AI_CMD1_DISARM, NISTC_AI_CMD1_REG); ni_stc_writew(dev, NISTC_AI_MODE1_START_STOP | diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index ffd435c468d6..9cea34473b52 100644 --- a/drivers/staging/comedi/drivers/ni_stc.h +++ b/drivers/staging/comedi/drivers/ni_stc.h @@ -577,7 +577,11 @@ #define NI_E_SERIAL_CMD_SDATA BIT(1) #define NI_E_SERIAL_CMD_SCLK BIT(0) -#define Misc_Command 0x0f +#define NI_E_MISC_CMD_REG 0x0f /* w8 */ +#define NI_E_MISC_CMD_INTEXT_ATRIG(x) (((x) & 0x1) << 7) +#define NI_E_MISC_CMD_EXT_ATRIG NI_E_MISC_CMD_INTEXT_ATRIG(0) +#define NI_E_MISC_CMD_INT_ATRIG NI_E_MISC_CMD_INTEXT_ATRIG(1) + #define Port_A 0x19 #define Port_B 0x1b #define Port_C 0x1d