From 61260f58496af82593f48f17071da950af500e60 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Fri, 1 May 2015 14:59:55 -0700 Subject: [PATCH] staging: comedi: ni_stc.h: tidy up 8255 register defines Only the 'Port_A' define is used. Rename the CamelCase and remove the unused defines. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_mio_common.c | 3 ++- drivers/staging/comedi/drivers/ni_stc.h | 10 ++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 06c491d4dac3..202957c0c3a7 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -5204,7 +5204,8 @@ static int ni_E_init(struct comedi_device *dev, /* 8255 device */ s = &dev->subdevices[NI_8255_DIO_SUBDEV]; if (board->has_8255) { - ret = subdev_8255_init(dev, s, ni_8255_callback, Port_A); + ret = subdev_8255_init(dev, s, ni_8255_callback, + NI_E_8255_BASE); if (ret) return ret; } else { diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index 9cea34473b52..3bf73a7a9921 100644 --- a/drivers/staging/comedi/drivers/ni_stc.h +++ b/drivers/staging/comedi/drivers/ni_stc.h @@ -582,14 +582,6 @@ #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 -#define Configuration 0x1f -#define Strobes 0x01 -#define Channel_A_Mode 0x03 -#define Channel_B_Mode 0x05 -#define Channel_C_Mode 0x07 #define AI_AO_Select 0x09 enum AI_AO_Select_Bits { AI_DMA_Select_Shift = 0, @@ -643,6 +635,8 @@ static inline unsigned int AI_CONFIG_CHANNEL(unsigned int channel) return channel & 0x3f; } +#define NI_E_8255_BASE 0x19 /* rw8 */ + #define ADC_FIFO_Data_Register 0x1c #define AO_Configuration 0x16 -- 2.39.5