This macro relies on a local variable having a specific name. Remove it.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
/* 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]; */
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;
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) {
static int i_ADDI_Reset(struct comedi_device *dev)
{
+ const struct addi_board *this_board = comedi_board(dev);
this_board->reset(dev);
return 0;
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);
}
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;
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;
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;
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;
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;
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;
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;
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;
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 =
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;
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;
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;
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);