Commit 02913e06 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: addi-data: remove this_board macro

This macro relies on a local variable having a specific name. Remove it.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3d41c443
...@@ -54,8 +54,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour ...@@ -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_DESCRIPTION("Comedi ADDI-DATA module"); */
/* Update-0.7.57->0.7.68MODULE_LICENSE("GPL"); */ /* 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) #if defined(CONFIG_APCI_1710) || defined(CONFIG_APCI_3200) || defined(CONFIG_APCI_3300)
/* BYTE b_SaveFPUReg [94]; */ /* BYTE b_SaveFPUReg [94]; */
...@@ -1401,6 +1399,7 @@ static const struct addi_board boardtypes[] = { ...@@ -1401,6 +1399,7 @@ static const struct addi_board boardtypes[] = {
static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) 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 addi_private *devpriv;
struct comedi_subdevice *s; struct comedi_subdevice *s;
int ret, pages, i, n_subdevices; int ret, pages, i, n_subdevices;
...@@ -1748,6 +1747,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -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) static void i_ADDI_Detach(struct comedi_device *dev)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
if (devpriv) { if (devpriv) {
...@@ -1801,6 +1801,7 @@ static void i_ADDI_Detach(struct comedi_device *dev) ...@@ -1801,6 +1801,7 @@ static void i_ADDI_Detach(struct comedi_device *dev)
static int i_ADDI_Reset(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); this_board->reset(dev);
return 0; return 0;
...@@ -1828,6 +1829,8 @@ static int i_ADDI_Reset(struct comedi_device *dev) ...@@ -1828,6 +1829,8 @@ static int i_ADDI_Reset(struct comedi_device *dev)
static irqreturn_t v_ADDI_Interrupt(int irq, void *d) static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
{ {
struct comedi_device *dev = d; struct comedi_device *dev = d;
const struct addi_board *this_board = comedi_board(dev);
this_board->interrupt(irq, d); this_board->interrupt(irq, d);
return IRQ_RETVAL(1); return IRQ_RETVAL(1);
} }
...@@ -1856,6 +1859,7 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d) ...@@ -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, static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
unsigned short w_Data; unsigned short w_Data;
unsigned short w_Address; unsigned short w_Address;
......
...@@ -805,6 +805,7 @@ void v_EepromCs76Read(unsigned int dw_Address, unsigned short w_offset, unsigned ...@@ -805,6 +805,7 @@ void v_EepromCs76Read(unsigned int dw_Address, unsigned short w_offset, unsigned
int i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress, int i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress,
char *pc_PCIChipInformation, struct comedi_device *dev) char *pc_PCIChipInformation, struct comedi_device *dev)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
unsigned short w_Temp, i, w_Count = 0; unsigned short w_Temp, i, w_Count = 0;
unsigned int ui_Temp; unsigned int ui_Temp;
......
...@@ -93,6 +93,7 @@ You should also find the complete GPL in the COPYING file accompanying this sour ...@@ -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, int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) 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; struct addi_private *devpriv = dev->private;
int i_ReturnValue = insn->n; int i_ReturnValue = insn->n;
unsigned char b_Command = 0; unsigned char b_Command = 0;
...@@ -287,6 +288,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev, ...@@ -287,6 +288,7 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev,
int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev, int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) 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; struct addi_private *devpriv = dev->private;
int i_ReturnValue = insn->n; int i_ReturnValue = insn->n;
unsigned char b_Command = 0; unsigned char b_Command = 0;
...@@ -435,6 +437,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev, ...@@ -435,6 +437,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev,
int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev, int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) 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; struct addi_private *devpriv = dev->private;
unsigned char b_Command = (unsigned char) CR_AREF(insn->chanspec); unsigned char b_Command = (unsigned char) CR_AREF(insn->chanspec);
int i_ReturnValue = insn->n; int i_ReturnValue = insn->n;
...@@ -576,6 +579,7 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev, ...@@ -576,6 +579,7 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev, int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data) 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; struct addi_private *devpriv = dev->private;
int i_ReturnValue = insn->n; int i_ReturnValue = insn->n;
unsigned char b_Command = 0; unsigned char b_Command = 0;
......
...@@ -147,6 +147,7 @@ int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, struct comedi_su ...@@ -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, int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
unsigned short us_ConvertTiming, us_TmpValue, i; unsigned short us_ConvertTiming, us_TmpValue, i;
unsigned char b_Tmp; unsigned char b_Tmp;
...@@ -482,6 +483,7 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_su ...@@ -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, int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_cmd *cmd) struct comedi_cmd *cmd)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
int err = 0; int err = 0;
...@@ -684,6 +686,7 @@ int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subde ...@@ -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, int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev,
struct comedi_subdevice *s) struct comedi_subdevice *s)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
unsigned char b_Tmp; unsigned char b_Tmp;
unsigned int ui_Tmp, ui_DelayTiming = 0, ui_TimerValue1 = 0, dmalen0 = unsigned int ui_Tmp, ui_DelayTiming = 0, ui_TimerValue1 = 0, dmalen0 =
...@@ -1895,6 +1898,7 @@ void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev, ...@@ -1895,6 +1898,7 @@ void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,
int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevice *s, int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
unsigned int ui_Timervalue2; unsigned int ui_Timervalue2;
unsigned short us_TmpValue; unsigned short us_TmpValue;
...@@ -2053,6 +2057,7 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevic ...@@ -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, int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data) struct comedi_insn *insn, unsigned int *data)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
unsigned int ui_Timervalue2 = 0; unsigned int ui_Timervalue2 = 0;
unsigned short us_TmpValue; unsigned short us_TmpValue;
......
...@@ -110,6 +110,7 @@ static int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device *dev, ...@@ -110,6 +110,7 @@ static int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
int i_ReturnValue = insn->n; int i_ReturnValue = insn->n;
unsigned char b_TimeBase = 0; unsigned char b_TimeBase = 0;
...@@ -361,6 +362,7 @@ static int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device *dev, ...@@ -361,6 +362,7 @@ static int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
const struct addi_board *this_board = comedi_board(dev);
struct addi_private *devpriv = dev->private; struct addi_private *devpriv = dev->private;
int i_ReturnValue = insn->n; int i_ReturnValue = insn->n;
unsigned char b_Configuration = (unsigned char) CR_RANGE(insn->chanspec); unsigned char b_Configuration = (unsigned char) CR_RANGE(insn->chanspec);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment