From: H Hartley Sweeten Date: Mon, 29 Oct 2012 23:51:47 +0000 (-0700) Subject: staging: comedi: addi-data: remove this_board macro X-Git-Tag: firefly_0821_release~3680^2~1519^2~840 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=02913e06c534c99aa9cc149b738fe932402f61e2;p=firefly-linux-kernel-4.4.55.git staging: comedi: addi-data: remove this_board macro This macro relies on a local variable having a specific name. Remove it. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index 9b0f5b2f6a11..985ec8848d33 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -54,8 +54,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour /* Update-0.7.57->0.7.68MODULE_DESCRIPTION("Comedi ADDI-DATA module"); */ /* Update-0.7.57->0.7.68MODULE_LICENSE("GPL"); */ -#define this_board ((const struct addi_board *)dev->board_ptr) - #if defined(CONFIG_APCI_1710) || defined(CONFIG_APCI_3200) || defined(CONFIG_APCI_3300) /* BYTE b_SaveFPUReg [94]; */ @@ -1401,6 +1399,7 @@ static const struct addi_board boardtypes[] = { static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv; struct comedi_subdevice *s; int ret, pages, i, n_subdevices; @@ -1748,6 +1747,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) static void i_ADDI_Detach(struct comedi_device *dev) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; if (devpriv) { @@ -1801,6 +1801,7 @@ static void i_ADDI_Detach(struct comedi_device *dev) static int i_ADDI_Reset(struct comedi_device *dev) { + const struct addi_board *this_board = comedi_board(dev); this_board->reset(dev); return 0; @@ -1828,6 +1829,8 @@ static int i_ADDI_Reset(struct comedi_device *dev) static irqreturn_t v_ADDI_Interrupt(int irq, void *d) { struct comedi_device *dev = d; + const struct addi_board *this_board = comedi_board(dev); + this_board->interrupt(irq, d); return IRQ_RETVAL(1); } @@ -1856,6 +1859,7 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d) static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; unsigned short w_Data; unsigned short w_Address; diff --git a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c index 0883fe0a930b..5d31ecdfb8e3 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c @@ -805,6 +805,7 @@ void v_EepromCs76Read(unsigned int dw_Address, unsigned short w_offset, unsigned int i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress, char *pc_PCIChipInformation, struct comedi_device *dev) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; unsigned short w_Temp, i, w_Count = 0; unsigned int ui_Temp; diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c index 859c593f95a2..3f55cd0ae535 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci16xx.c @@ -93,6 +93,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; int i_ReturnValue = insn->n; unsigned char b_Command = 0; @@ -287,6 +288,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev, int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; int i_ReturnValue = insn->n; unsigned char b_Command = 0; @@ -435,6 +437,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev, int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; unsigned char b_Command = (unsigned char) CR_AREF(insn->chanspec); int i_ReturnValue = insn->n; @@ -576,6 +579,7 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev, int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; int i_ReturnValue = insn->n; unsigned char b_Command = 0; diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c index 0f7c8260264c..0cbe915a5ce9 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c @@ -147,6 +147,7 @@ int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, struct comedi_su int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; unsigned short us_ConvertTiming, us_TmpValue, i; unsigned char b_Tmp; @@ -482,6 +483,7 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_su int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_cmd *cmd) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; int err = 0; @@ -684,6 +686,7 @@ int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subde int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev, struct comedi_subdevice *s) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; unsigned char b_Tmp; unsigned int ui_Tmp, ui_DelayTiming = 0, ui_TimerValue1 = 0, dmalen0 = @@ -1895,6 +1898,7 @@ void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev, int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; unsigned int ui_Timervalue2; unsigned short us_TmpValue; @@ -2053,6 +2057,7 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevic int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; unsigned int ui_Timervalue2 = 0; unsigned short us_TmpValue; diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c index 431df5c90ce9..80974f27ff30 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3xxx.c @@ -110,6 +110,7 @@ static int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; int i_ReturnValue = insn->n; unsigned char b_TimeBase = 0; @@ -361,6 +362,7 @@ static int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_insn *insn, unsigned int *data) { + const struct addi_board *this_board = comedi_board(dev); struct addi_private *devpriv = dev->private; int i_ReturnValue = insn->n; unsigned char b_Configuration = (unsigned char) CR_RANGE(insn->chanspec);