[PATCH 016/107] staging: comedi: ni_stc.h: tidy up NI_M_AO_REF_ATTENUATION_REG bits

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

 



Rename the CamelCase and convert the enum 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 | 4 ++--
 drivers/staging/comedi/drivers/ni_stc.h        | 5 +----
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c
index 7f4e9d6..c100c08 100644
--- a/drivers/staging/comedi/drivers/ni_mio_common.c
+++ b/drivers/staging/comedi/drivers/ni_mio_common.c
@@ -2675,12 +2675,12 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device *dev,
 			break;
 		case 4000000:
 			conf |= NI_M_AO_CFG_BANK_REF_INT_10V;
-			ni_writeb(dev, MSeries_Attenuate_x5_Bit,
+			ni_writeb(dev, NI_M_AO_REF_ATTENUATION_X5,
 				  NI_M_AO_REF_ATTENUATION_REG(chan));
 			break;
 		case 2000000:
 			conf |= NI_M_AO_CFG_BANK_REF_INT_5V;
-			ni_writeb(dev, MSeries_Attenuate_x5_Bit,
+			ni_writeb(dev, NI_M_AO_REF_ATTENUATION_X5,
 				  NI_M_AO_REF_ATTENUATION_REG(chan));
 			break;
 		default:
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index bde5803..1ad7981 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -1037,10 +1037,7 @@ static const struct comedi_lrange range_ni_E_ao_ext;
 #define NI_M_CDO_MASK_ENA_REG		0x234
 #define NI_M_STATIC_AI_CTRL_REG(x)	((x) ? (0x260 + (x)) : 0x064)
 #define NI_M_AO_REF_ATTENUATION_REG(x)	(0x264 + (x))
-
-enum MSeries_AO_Reference_Attenuation_Bits {
-	MSeries_Attenuate_x5_Bit = 0x1
-};
+#define NI_M_AO_REF_ATTENUATION_X5	BIT(0)
 
 static inline unsigned MSeries_Cal_PWM_High_Time_Bits(unsigned count)
 {
-- 
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