[PATCH 026/107] staging: comedi: ni_stc.h: tidy up NI_M_INTC_ENA_REG bits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rename the CamelCase and convert enums into defines. Use the BIT()
macro to define the bits.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/ni_mio_common.c | 2 +-
 drivers/staging/comedi/drivers/ni_stc.h        | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index e8c6fff..1ecbb3c 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -3433,7 +3433,7 @@ static int ni_cdo_inttrig(struct comedi_device *dev,
 	/*
 	 * XXX not sure what interrupt C group does
 	 * wait for dma to fill output fifo
-	 * ni_writeb(dev, Interrupt_Group_C_Enable_Bit, NI_M_INTC_ENA_REG);
+	 * ni_writeb(dev, NI_M_INTC_ENA, NI_M_INTC_ENA_REG);
 	 */
 	for (i = 0; i < timeout; ++i) {
 		if (ni_readl(dev, NI_M_CDIO_STATUS_REG) &
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index a05c6ef..a29e65a 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -959,6 +959,7 @@ static const struct comedi_lrange range_ni_E_ao_ext;
 #define NI_M_AI_CFG_BANK_SEL(x)		((((x) & 0x40) << 4) | ((x) & 0x30))
 #define NI_M_AI_CFG_CHAN_SEL(x)		(((x) & 0xf) << 0)
 #define NI_M_INTC_ENA_REG		0x088
+#define NI_M_INTC_ENA			BIT(0)
 #define NI_M_INTC_STATUS_REG		0x088
 #define NI_M_ATRIG_CTRL_REG		0x08c
 #define NI_M_AO_SER_INT_ENA_REG		0x0a0
@@ -1112,10 +1113,6 @@ static const struct comedi_lrange range_ni_E_ao_ext;
 #define NI_M_AO_REF_ATTENUATION_REG(x)	(0x264 + (x))
 #define NI_M_AO_REF_ATTENUATION_X5	BIT(0)
 
-enum Interrupt_C_Enable_Bits {
-	Interrupt_Group_C_Enable_Bit = 0x1
-};
-
 enum Interrupt_C_Status_Bits {
 	Interrupt_Group_C_Status_Bit = 0x1
 };
-- 
2.3.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux