Commit 9b9bcba0 authored by Bill Pemberton's avatar Bill Pemberton Committed by Greg Kroah-Hartman

Staging: comedi: remove space after ampersand

Change calses of & foo to &foo as suggested by checkpatch.
Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 56e9e166
......@@ -695,7 +695,7 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice
i_ReturnValue = i_APCI1710_ReadTimerValue(dev,
(unsigned char)CR_AREF(insn->chanspec),
(unsigned char)CR_CHAN(insn->chanspec),
(unsigned int *) & data[0]);
(unsigned int *) &data[0]);
break;
case APCI1710_TIMER_GETOUTPUTLEVEL:
......
......@@ -1101,25 +1101,25 @@ int i_APCI1710_InsnReadChrono(struct comedi_device *dev, struct comedi_subdevice
switch (b_ReadType) {
case APCI1710_CHRONO_PROGRESS_STATUS:
i_ReturnValue = i_APCI1710_GetChronoProgressStatus(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) &data[0]);
break;
case APCI1710_CHRONO_READVALUE:
i_ReturnValue = i_APCI1710_ReadChronoValue(dev,
(unsigned char) CR_AREF(insn->chanspec),
(unsigned int) insn->unused[0],
(unsigned char *) & data[0], (unsigned int *) & data[1]);
(unsigned char *) &data[0], (unsigned int *) &data[1]);
break;
case APCI1710_CHRONO_CONVERTVALUE:
i_ReturnValue = i_APCI1710_ConvertChronoValue(dev,
(unsigned char) CR_AREF(insn->chanspec),
(unsigned int) insn->unused[0],
(unsigned int *) & data[0],
(unsigned char *) & data[1],
(unsigned char *) & data[2],
(unsigned int *) & data[3],
(unsigned int *) & data[4], (unsigned int *) & data[5]);
(unsigned int *) &data[0],
(unsigned char *) &data[1],
(unsigned char *) &data[2],
(unsigned int *) &data[3],
(unsigned int *) &data[4], (unsigned int *) &data[5]);
break;
case APCI1710_CHRONO_READINTERRUPT:
......@@ -1962,7 +1962,7 @@ int i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,
/**********************************/
/* Test the digital input channel */
/**********************************/
pb_ChannelStatus = (unsigned char *) & data[0];
pb_ChannelStatus = (unsigned char *) &data[0];
b_InputChannel =
(unsigned char) CR_CHAN(insn->chanspec);
......@@ -1992,7 +1992,7 @@ int i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,
case APCI1710_CHRONO_READ_PORT:
pb_PortValue = (unsigned char *) & data[0];
pb_PortValue = (unsigned char *) &data[0];
dw_Status =
inl(devpriv->s_BoardInfos.
......
......@@ -303,7 +303,7 @@ int i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device *dev,
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_InputChannel = (unsigned char) CR_CHAN(insn->chanspec);
data[0] = 0;
pb_ChannelStatus = (unsigned char *) & data[0];
pb_ChannelStatus = (unsigned char *) &data[0];
i_ReturnValue = insn->n;
/**************************/
......@@ -747,7 +747,7 @@ int i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device *dev,
b_PortOnOFF = (unsigned char) data[1]; /* if output then On or Off */
b_PortValue = (unsigned char) data[2]; /* if out put then Value */
i_ReturnValue = insn->n;
pb_PortValue = (unsigned char *) & data[0];
pb_PortValue = (unsigned char *) &data[0];
/* if input then read value */
switch (b_PortOperation) {
......
......@@ -96,7 +96,7 @@ int i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev, struct comedi_subdevi
case APCI1710_INCCPT_COUNTERAUTOTEST:
i_ReturnValue = i_APCI1710_CounterAutoTest(dev,
(unsigned char *) & data[0]);
(unsigned char *) &data[0]);
break;
case APCI1710_INCCPT_INITINDEX:
......@@ -126,7 +126,7 @@ int i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev, struct comedi_subdevi
i_ReturnValue = i_APCI1710_InitFrequencyMeasurement(dev,
CR_AREF(insn->chanspec),
(unsigned char) data[0],
(unsigned char) data[1], (unsigned int) data[2], (unsigned int *) & data[0]);
(unsigned char) data[1], (unsigned int) data[2], (unsigned int *) &data[0]);
break;
default:
......@@ -4062,69 +4062,69 @@ int i_APCI1710_InsnReadINCCPT(struct comedi_device *dev, struct comedi_subdevice
case APCI1710_INCCPT_READLATCHREGISTERSTATUS:
i_ReturnValue = i_APCI1710_ReadLatchRegisterStatus(dev,
(unsigned char) CR_AREF(insn->chanspec),
(unsigned char) CR_RANGE(insn->chanspec), (unsigned char *) & data[0]);
(unsigned char) CR_RANGE(insn->chanspec), (unsigned char *) &data[0]);
break;
case APCI1710_INCCPT_READLATCHREGISTERVALUE:
i_ReturnValue = i_APCI1710_ReadLatchRegisterValue(dev,
(unsigned char) CR_AREF(insn->chanspec),
(unsigned char) CR_RANGE(insn->chanspec), (unsigned int *) & data[0]);
(unsigned char) CR_RANGE(insn->chanspec), (unsigned int *) &data[0]);
printk("Latch Register Value %d\n", data[0]);
break;
case APCI1710_INCCPT_READ16BITCOUNTERVALUE:
i_ReturnValue = i_APCI1710_Read16BitCounterValue(dev,
(unsigned char) CR_AREF(insn->chanspec),
(unsigned char) CR_RANGE(insn->chanspec), (unsigned int *) & data[0]);
(unsigned char) CR_RANGE(insn->chanspec), (unsigned int *) &data[0]);
break;
case APCI1710_INCCPT_READ32BITCOUNTERVALUE:
i_ReturnValue = i_APCI1710_Read32BitCounterValue(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned int *) & data[0]);
(unsigned char) CR_AREF(insn->chanspec), (unsigned int *) &data[0]);
break;
case APCI1710_INCCPT_GETINDEXSTATUS:
i_ReturnValue = i_APCI1710_GetIndexStatus(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) &data[0]);
break;
case APCI1710_INCCPT_GETREFERENCESTATUS:
i_ReturnValue = i_APCI1710_GetReferenceStatus(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) &data[0]);
break;
case APCI1710_INCCPT_GETUASSTATUS:
i_ReturnValue = i_APCI1710_GetUASStatus(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) &data[0]);
break;
case APCI1710_INCCPT_GETCBSTATUS:
i_ReturnValue = i_APCI1710_GetCBStatus(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) &data[0]);
break;
case APCI1710_INCCPT_GET16BITCBSTATUS:
i_ReturnValue = i_APCI1710_Get16BitCBStatus(dev,
(unsigned char) CR_AREF(insn->chanspec),
(unsigned char *) & data[0], (unsigned char *) & data[1]);
(unsigned char *) &data[0], (unsigned char *) &data[1]);
break;
case APCI1710_INCCPT_GETUDSTATUS:
i_ReturnValue = i_APCI1710_GetUDStatus(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) &data[0]);
break;
case APCI1710_INCCPT_GETINTERRUPTUDLATCHEDSTATUS:
i_ReturnValue = i_APCI1710_GetInterruptUDLatchedStatus(dev,
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) & data[0]);
(unsigned char) CR_AREF(insn->chanspec), (unsigned char *) &data[0]);
break;
case APCI1710_INCCPT_READFREQUENCYMEASUREMENT:
i_ReturnValue = i_APCI1710_ReadFrequencyMeasurement(dev,
(unsigned char) CR_AREF(insn->chanspec),
(unsigned char *) & data[0],
(unsigned char *) & data[1], (unsigned int *) & data[2]);
(unsigned char *) &data[0],
(unsigned char *) &data[1], (unsigned int *) &data[2]);
break;
case APCI1710_INCCPT_READINTERRUPT:
......
......@@ -724,8 +724,8 @@ int i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device *dev,
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_Type = (unsigned char) data[0];
b_PulseEncoderNbr = (unsigned char) data[1];
pb_Status = (unsigned char *) & data[0];
pul_ReadValue = (unsigned int *) & data[1];
pb_Status = (unsigned char *) &data[0];
pul_ReadValue = (unsigned int *) &data[1];
/***********************************/
/* Test the selected module number */
......
......@@ -85,23 +85,23 @@ int i_APCI1710_InsnConfigPWM(struct comedi_device *dev, struct comedi_subdevice
(unsigned char) data[2], /* b_TimingUnit */
(unsigned int) data[3], /* ul_LowTiming */
(unsigned int) data[4], /* ul_HighTiming */
(unsigned int *) & data[0], /* pul_RealLowTiming */
(unsigned int *) & data[1] /* pul_RealHighTiming */
(unsigned int *) &data[0], /* pul_RealLowTiming */
(unsigned int *) &data[1] /* pul_RealHighTiming */
);
break;
case APCI1710_PWM_GETINITDATA:
i_ReturnValue = i_APCI1710_GetPWMInitialisation(dev, (unsigned char) CR_AREF(insn->chanspec), /* b_ModulNbr */
(unsigned char) data[0], /* b_PWM */
(unsigned char *) & data[0], /* pb_TimingUnit */
(unsigned int *) & data[1], /* pul_LowTiming */
(unsigned int *) & data[2], /* pul_HighTiming */
(unsigned char *) & data[3], /* pb_StartLevel */
(unsigned char *) & data[4], /* pb_StopMode */
(unsigned char *) & data[5], /* pb_StopLevel */
(unsigned char *) & data[6], /* pb_ExternGate */
(unsigned char *) & data[7], /* pb_InterruptEnable */
(unsigned char *) & data[8] /* pb_Enable */
(unsigned char *) &data[0], /* pb_TimingUnit */
(unsigned int *) &data[1], /* pul_LowTiming */
(unsigned int *) &data[2], /* pul_HighTiming */
(unsigned char *) &data[3], /* pb_StartLevel */
(unsigned char *) &data[4], /* pb_StopMode */
(unsigned char *) &data[5], /* pb_StopLevel */
(unsigned char *) &data[6], /* pb_ExternGate */
(unsigned char *) &data[7], /* pb_InterruptEnable */
(unsigned char *) &data[8] /* pb_Enable */
);
break;
......@@ -3474,8 +3474,8 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device *dev, struct comedi_sub
i_ReturnValue = insn->n;
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_PWM = (unsigned char) CR_CHAN(insn->chanspec);
pb_PWMOutputStatus = (unsigned char *) & data[0];
pb_ExternGateStatus = (unsigned char *) & data[1];
pb_PWMOutputStatus = (unsigned char *) &data[0];
pb_ExternGateStatus = (unsigned char *) &data[1];
/**************************/
/* Test the module number */
......
......@@ -422,12 +422,12 @@ int i_APCI1710_InsnReadSSIValue(struct comedi_device *dev, struct comedi_subdevi
unsigned int *pul_TurnCpt1;
i_ReturnValue = insn->n;
pul_Position1 = (unsigned int *) & data[0];
pul_Position1 = (unsigned int *) &data[0];
/* For Read1 */
pul_TurnCpt1 = (unsigned int *) & data[1];
pul_TurnCpt1 = (unsigned int *) &data[1];
/* For Read all */
pul_Position = (unsigned int *) & data[0]; /* 0-2 */
pul_TurnCpt = (unsigned int *) & data[3]; /* 3-5 */
pul_Position = (unsigned int *) &data[0]; /* 0-2 */
pul_TurnCpt = (unsigned int *) &data[3]; /* 3-5 */
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
b_SelectedSSI = (unsigned char) CR_CHAN(insn->chanspec);
b_ReadType = (unsigned char) CR_RANGE(insn->chanspec);
......@@ -786,7 +786,7 @@ int i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device *dev, struct comedi_sub
/******************************************/
b_InputChannel = (unsigned char) CR_CHAN(insn->chanspec);
pb_ChannelStatus = (unsigned char *) & data[0];
pb_ChannelStatus = (unsigned char *) &data[0];
if (b_InputChannel <= 2) {
/**************************/
......@@ -814,7 +814,7 @@ int i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device *dev, struct comedi_sub
/**************************/
/* Read all digital input */
/**************************/
pb_InputStatus = (unsigned char *) & data[0];
pb_InputStatus = (unsigned char *) &data[0];
dw_StatusReg =
inl(devpriv->s_BoardInfos.ui_Address +
......
......@@ -1479,13 +1479,13 @@ int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device *dev,
b_ModulNbr = CR_AREF(insn->chanspec);
b_TorCounter = CR_CHAN(insn->chanspec);
pb_TimingUnit = (unsigned char *) & data[0];
pul_TimingInterval = (unsigned int *) & data[1];
pb_InputMode = (unsigned char *) & data[2];
pb_ExternGate = (unsigned char *) & data[3];
pb_CycleMode = (unsigned char *) & data[4];
pb_Enable = (unsigned char *) & data[5];
pb_InterruptEnable = (unsigned char *) & data[6];
pb_TimingUnit = (unsigned char *) &data[0];
pul_TimingInterval = (unsigned int *) &data[1];
pb_InputMode = (unsigned char *) &data[2];
pb_ExternGate = (unsigned char *) &data[3];
pb_CycleMode = (unsigned char *) &data[4];
pb_Enable = (unsigned char *) &data[5];
pb_InterruptEnable = (unsigned char *) &data[6];
/**************************/
/* Test the module number */
......@@ -1719,8 +1719,8 @@ int i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device
b_ReadType = (unsigned char) data[0];
b_TorCounter = (unsigned char) data[1];
ui_TimeOut = (unsigned int) data[2];
pb_TorCounterStatus = (unsigned char *) & data[0];
pul_TorCounterValue = (unsigned int *) & data[1];
pb_TorCounterStatus = (unsigned char *) &data[0];
pul_TorCounterValue = (unsigned int *) &data[1];
/**************************/
/* Test the module number */
......
......@@ -439,7 +439,7 @@ int i_APCI1710_InsnBitsReadTTLIO(struct comedi_device *dev, struct comedi_subdev
switch (b_ReadType) {
case APCI1710_TTL_READCHANNEL:
pb_ChannelStatus = (unsigned char *) & data[0];
pb_ChannelStatus = (unsigned char *) &data[0];
/********************************/
/* Test the TTL I/O port number */
/********************************/
......@@ -533,7 +533,7 @@ int i_APCI1710_InsnBitsReadTTLIO(struct comedi_device *dev, struct comedi_subdev
break;
case APCI1710_TTL_READPORT:
pb_PortValue = (unsigned char *) & data[0];
pb_PortValue = (unsigned char *) &data[0];
/********************************/
/* Test the TTL I/O port number */
/********************************/
......@@ -665,7 +665,7 @@ int i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
i_ReturnValue = insn->n;
pul_PortValue = (unsigned int *) & data[0];
pul_PortValue = (unsigned int *) &data[0];
/**************************/
/* Test the module number */
......
......@@ -380,7 +380,7 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev,
/**************************/
if (i_ReturnValue >= 0) {
pb_Status = (unsigned char *) & data[0];
pb_Status = (unsigned char *) &data[0];
/*******************************/
/* Get the digital inpu status */
......
......@@ -873,7 +873,7 @@ static int jr3_pci_attach(struct comedi_device *dev, struct comedi_devconfig *it
p->range[j].range.max = 1000000;
for (k = 0; k < 7; k++) {
p->range_table_list[j + k * 8] =
(struct comedi_lrange *) & p->range[j];
(struct comedi_lrange *) &p->range[j];
p->maxdata_list[j + k * 8] = 0x7fff;
}
}
......@@ -882,9 +882,9 @@ static int jr3_pci_attach(struct comedi_device *dev, struct comedi_devconfig *it
p->range[8].range.max = 65536;
p->range_table_list[56] =
(struct comedi_lrange *) & p->range[8];
(struct comedi_lrange *) &p->range[8];
p->range_table_list[57] =
(struct comedi_lrange *) & p->range[8];
(struct comedi_lrange *) &p->range[8];
p->maxdata_list[56] = 0xffff;
p->maxdata_list[57] = 0xffff;
/* Channel specific range and maxdata */
......
......@@ -859,10 +859,10 @@ static irqreturn_t interrupt_pcmmio(int irq, void *d)
}
}
/* Write the scan to the buffer. */
if (comedi_buf_put(s->async, ((short *) & val)[0])
if (comedi_buf_put(s->async, ((short *) &val)[0])
&&
comedi_buf_put
(s->async, ((short *) & val)[1])) {
(s->async, ((short *) &val)[1])) {
s->async->events |= (COMEDI_CB_BLOCK | COMEDI_CB_EOS);
} else {
/* Overflow! Stop acquisition!! */
......
......@@ -781,10 +781,10 @@ static irqreturn_t interrupt_pcmuio(int irq, void *d)
}
}
/* Write the scan to the buffer. */
if (comedi_buf_put(s->async, ((short *) & val)[0])
if (comedi_buf_put(s->async, ((short *) &val)[0])
&&
comedi_buf_put
(s->async, ((short *) & val)[1])) {
(s->async, ((short *) &val)[1])) {
s->async->events |= (COMEDI_CB_BLOCK | COMEDI_CB_EOS);
} else {
/* Overflow! Stop acquisition!! */
......
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