Commit 6c7d2c8b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: drivers/*.c: alignment should match open parenthesis

Fix the alignment issues in all the comedi drivers.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9949595c
......@@ -238,7 +238,7 @@ static int apci1032_cos_cmd(struct comedi_device *dev,
if (!devpriv->ctrl) {
dev_warn(dev->class_dev,
"Interrupts disabled due to mode configuration!\n");
"Interrupts disabled due to mode configuration!\n");
return -EINVAL;
}
......@@ -296,7 +296,7 @@ static int apci1032_di_insn_bits(struct comedi_device *dev,
}
static int apci1032_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct apci1032_private *devpriv;
......
......@@ -407,7 +407,7 @@ static int apci1564_cos_cmd(struct comedi_device *dev,
if (!devpriv->ctrl) {
dev_warn(dev->class_dev,
"Interrupts disabled due to mode configuration!\n");
"Interrupts disabled due to mode configuration!\n");
return -EINVAL;
}
......@@ -430,7 +430,7 @@ static int apci1564_cos_cancel(struct comedi_device *dev,
}
static int apci1564_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct apci1564_private *devpriv;
......
......@@ -203,7 +203,7 @@ static unsigned short apci3501_eeprom_readw(unsigned long iobase,
outb(NVCMD_LOAD_HIGH, iobase + AMCC_OP_REG_MCSR_NVCMD);
apci3501_eeprom_wait(iobase);
outb(((addr + i) >> 8) & 0xff,
iobase + AMCC_OP_REG_MCSR_NVDATA);
iobase + AMCC_OP_REG_MCSR_NVDATA);
apci3501_eeprom_wait(iobase);
/* Read the eeprom data byte */
......
......@@ -54,7 +54,7 @@ static int addi_watchdog_insn_config(struct comedi_device *dev,
/* Time base is 20ms, let the user know the timeout */
dev_info(dev->class_dev, "watchdog enabled, timeout:%dms\n",
20 * reload + 20);
20 * reload + 20);
break;
case INSN_CONFIG_DISARM:
spriv->wdog_ctrl = 0;
......
......@@ -69,7 +69,7 @@ static int adl_pci8164_insn_write(struct comedi_device *dev,
}
static int adl_pci8164_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct comedi_subdevice *s;
......
......@@ -378,7 +378,7 @@ static int pci9111_ai_do_cmd(struct comedi_device *dev,
/* This is the same gain on every channel */
outb(CR_RANGE(cmd->chanlist[0]) & PCI9111_AI_RANGE_MASK,
dev->iobase + PCI9111_AI_RANGE_STAT_REG);
dev->iobase + PCI9111_AI_RANGE_STAT_REG);
/* Set timer pacer */
dev_private->scan_delay = 0;
......@@ -572,7 +572,7 @@ static int pci9111_ai_insn_read(struct comedi_device *dev,
status = inb(dev->iobase + PCI9111_AI_RANGE_STAT_REG);
if ((status & PCI9111_AI_RANGE_MASK) != range) {
outb(range & PCI9111_AI_RANGE_MASK,
dev->iobase + PCI9111_AI_RANGE_STAT_REG);
dev->iobase + PCI9111_AI_RANGE_STAT_REG);
}
pci9111_fifo_reset(dev);
......@@ -650,7 +650,7 @@ static int pci9111_reset(struct comedi_device *dev)
}
static int pci9111_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct pci9111_private_data *dev_private;
......
......@@ -936,7 +936,7 @@ static int Compute_and_setup_dma(struct comedi_device *dev,
/* outl(0x02000000|AINT_WRITE_COMPL, devpriv->iobase_a+AMCC_OP_REG_INTCSR); */
pci9118_amcc_dma_ena(dev, true);
outl(inl(devpriv->iobase_a + AMCC_OP_REG_INTCSR) | EN_A2P_TRANSFERS,
devpriv->iobase_a + AMCC_OP_REG_INTCSR);
devpriv->iobase_a + AMCC_OP_REG_INTCSR);
/* allow bus mastering */
return 0;
......
......@@ -525,7 +525,7 @@ static int wait_for_nvram_ready(unsigned long s5933_base_addr)
}
static int nvram_read(struct comedi_device *dev, unsigned int address,
uint8_t *data)
uint8_t *data)
{
struct cb_pcidas_private *devpriv = dev->private;
unsigned long iobase = devpriv->s5933_config;
......
......@@ -134,7 +134,7 @@ static int cb_pcimdda_ao_insn_read(struct comedi_device *dev,
}
static int cb_pcimdda_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct comedi_subdevice *s;
......
......@@ -313,9 +313,9 @@ static int bonding_attach(struct comedi_device *dev,
s->insn_config = bonding_dio_insn_config;
dev_info(dev->class_dev,
"%s: %s attached, %u channels from %u devices\n",
dev->driver->driver_name, dev->board_name,
devpriv->nchans, devpriv->ndevs);
"%s: %s attached, %u channels from %u devices\n",
dev->driver->driver_name, dev->board_name,
devpriv->nchans, devpriv->ndevs);
return 0;
}
......
......@@ -234,7 +234,8 @@ void comedi_isadma_free(struct comedi_isadma *dma)
desc = &dma->desc[i];
if (desc->virt_addr)
dma_free_coherent(NULL, desc->maxsize,
desc->virt_addr, desc->hw_addr);
desc->virt_addr,
desc->hw_addr);
}
kfree(dma->desc);
}
......
......@@ -59,7 +59,7 @@ static int contec_di_insn_bits(struct comedi_device *dev,
}
static int contec_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct comedi_subdevice *s;
......
......@@ -649,7 +649,7 @@ static const void *daqboard2000_find_boardinfo(struct comedi_device *dev,
}
static int daqboard2000_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct daq200_boardtype *board;
......
......@@ -708,7 +708,7 @@ static int das16_cmd_exec(struct comedi_device *dev, struct comedi_subdevice *s)
if (cmd->flags & CMDF_PRIORITY) {
dev_err(dev->class_dev,
"isa dma transfers cannot be performed with CMDF_PRIORITY, aborting\n");
"isa dma transfers cannot be performed with CMDF_PRIORITY, aborting\n");
return -1;
}
......
......@@ -167,7 +167,7 @@ static int das16m1_ai_check_chanlist(struct comedi_device *dev,
if ((i % 2) != (chan % 2)) {
dev_dbg(dev->class_dev,
"even/odd channels must go have even/odd chanlist indices\n");
"even/odd channels must go have even/odd chanlist indices\n");
return -EINVAL;
}
}
......
......@@ -764,7 +764,7 @@ static int dt282x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
if (cmd->scan_begin_src == TRIG_FOLLOW) {
outw(devpriv->supcsr | DT2821_SUPCSR_STRIG,
dev->iobase + DT2821_SUPCSR_REG);
dev->iobase + DT2821_SUPCSR_REG);
} else {
devpriv->supcsr |= DT2821_SUPCSR_XTRIG;
outw(devpriv->supcsr, dev->iobase + DT2821_SUPCSR_REG);
......
......@@ -70,8 +70,9 @@ static int dyna_pci10xx_ai_eoc(struct comedi_device *dev,
}
static int dyna_pci10xx_insn_read_ai(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)
{
struct dyna_pci10xx_private *devpriv = dev->private;
int n;
......@@ -109,8 +110,9 @@ static int dyna_pci10xx_insn_read_ai(struct comedi_device *dev,
/* analog output callback */
static int dyna_pci10xx_insn_write_ao(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)
{
struct dyna_pci10xx_private *devpriv = dev->private;
int n;
......@@ -132,8 +134,9 @@ static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev,
/* digital input bit interface */
static int dyna_pci10xx_di_insn_bits(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)
{
struct dyna_pci10xx_private *devpriv = dev->private;
u16 d = 0;
......@@ -171,7 +174,7 @@ static int dyna_pci10xx_do_insn_bits(struct comedi_device *dev,
}
static int dyna_pci10xx_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct dyna_pci10xx_private *devpriv;
......
......@@ -445,7 +445,7 @@ static int icp_multi_reset(struct comedi_device *dev)
}
static int icp_multi_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct icp_multi_private *devpriv;
......
......@@ -423,7 +423,7 @@ static void me4000_reset(struct comedi_device *dev)
/* Set both stop bits in the analog input control register */
outl(ME4000_AI_CTRL_BIT_IMMEDIATE_STOP | ME4000_AI_CTRL_BIT_STOP,
dev->iobase + ME4000_AI_CTRL_REG);
dev->iobase + ME4000_AI_CTRL_REG);
/* Set both stop bits in the analog output control register */
val = ME4000_AO_CTRL_BIT_IMMEDIATE_STOP | ME4000_AO_CTRL_BIT_STOP;
......@@ -437,7 +437,7 @@ static void me4000_reset(struct comedi_device *dev)
/* Set the adustment register for AO demux */
outl(ME4000_AO_DEMUX_ADJUST_VALUE,
dev->iobase + ME4000_AO_DEMUX_ADJUST_REG);
dev->iobase + ME4000_AO_DEMUX_ADJUST_REG);
/*
* Set digital I/O direction for port 0
......@@ -608,7 +608,7 @@ static int me4000_ai_check_chanlist(struct comedi_device *dev,
if (!comedi_range_is_bipolar(s, range)) {
dev_dbg(dev->class_dev,
"Bipolar is not selected in differential mode\n");
"Bipolar is not selected in differential mode\n");
return -EINVAL;
}
}
......@@ -771,12 +771,12 @@ static int ai_prepare(struct comedi_device *dev,
/* Stop triggers */
if (cmd->stop_src == TRIG_COUNT) {
outl(cmd->chanlist_len * cmd->stop_arg,
dev->iobase + ME4000_AI_SAMPLE_COUNTER_REG);
dev->iobase + ME4000_AI_SAMPLE_COUNTER_REG);
tmp |= ME4000_AI_CTRL_BIT_HF_IRQ | ME4000_AI_CTRL_BIT_SC_IRQ;
} else if (cmd->stop_src == TRIG_NONE &&
cmd->scan_end_src == TRIG_COUNT) {
outl(cmd->scan_end_arg,
dev->iobase + ME4000_AI_SAMPLE_COUNTER_REG);
dev->iobase + ME4000_AI_SAMPLE_COUNTER_REG);
tmp |= ME4000_AI_CTRL_BIT_HF_IRQ | ME4000_AI_CTRL_BIT_SC_IRQ;
} else {
tmp |= ME4000_AI_CTRL_BIT_HF_IRQ;
......@@ -1186,13 +1186,13 @@ static int me4000_dio_insn_bits(struct comedi_device *dev,
{
if (comedi_dio_update_state(s, data)) {
outl((s->state >> 0) & 0xFF,
dev->iobase + ME4000_DIO_PORT_0_REG);
dev->iobase + ME4000_DIO_PORT_0_REG);
outl((s->state >> 8) & 0xFF,
dev->iobase + ME4000_DIO_PORT_1_REG);
dev->iobase + ME4000_DIO_PORT_1_REG);
outl((s->state >> 16) & 0xFF,
dev->iobase + ME4000_DIO_PORT_2_REG);
dev->iobase + ME4000_DIO_PORT_2_REG);
outl((s->state >> 24) & 0xFF,
dev->iobase + ME4000_DIO_PORT_3_REG);
dev->iobase + ME4000_DIO_PORT_3_REG);
}
data[1] = ((inl(dev->iobase + ME4000_DIO_PORT_0_REG) & 0xFF) << 0) |
......@@ -1296,7 +1296,7 @@ static int me4000_auto_attach(struct comedi_device *dev,
if (pcidev->irq > 0) {
result = request_irq(pcidev->irq, me4000_ai_isr, IRQF_SHARED,
dev->board_name, dev);
dev->board_name, dev);
if (result == 0)
dev->irq = pcidev->irq;
}
......@@ -1378,7 +1378,7 @@ static int me4000_auto_attach(struct comedi_device *dev,
if (!inl(dev->iobase + ME4000_DIO_DIR_REG)) {
s->io_bits |= 0xFF;
outl(ME4000_DIO_CTRL_BIT_MODE_0,
dev->iobase + ME4000_DIO_DIR_REG);
dev->iobase + ME4000_DIO_DIR_REG);
}
/* Counter subdevice (8254) */
......
......@@ -676,7 +676,7 @@ static int ni_65xx_auto_attach(struct comedi_device *dev,
}
dev_info(dev->class_dev, "board: %s, ID=0x%02x", dev->board_name,
readb(dev->mmio + NI_65XX_ID_REG));
readb(dev->mmio + NI_65XX_ID_REG));
ret = comedi_alloc_subdevices(dev, 4);
if (ret)
......
......@@ -2526,7 +2526,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
start_stop_select |=
AI_START_Select(1 + CR_CHAN(cmd->scan_begin_arg));
ni_stc_writew(dev, start_stop_select,
AI_START_STOP_Select_Register);
AI_START_STOP_Select_Register);
break;
}
......
......@@ -568,7 +568,7 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
} else if (it->options[2]) {
/* request the irq for the 2nd asic */
ret = request_irq(it->options[2], pcmuio_interrupt, 0,
dev->board_name, dev);
dev->board_name, dev);
if (ret == 0)
devpriv->irq2 = it->options[2];
}
......
......@@ -1181,8 +1181,8 @@ static void rtd_pci_latency_quirk(struct comedi_device *dev,
pci_read_config_byte(pcidev, PCI_LATENCY_TIMER, &pci_latency);
if (pci_latency < 32) {
dev_info(dev->class_dev,
"PCI latency changed from %d to %d\n",
pci_latency, 32);
"PCI latency changed from %d to %d\n",
pci_latency, 32);
pci_write_config_byte(pcidev, PCI_LATENCY_TIMER, 32);
}
}
......
......@@ -231,9 +231,9 @@ static void s626_debi_replace(struct comedi_device *dev, unsigned int addr,
/* ************** EEPROM ACCESS FUNCTIONS ************** */
static int s626_i2c_handshake_eoc(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned long context)
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned long context)
{
bool status;
......@@ -294,7 +294,7 @@ static uint8_t s626_i2c_read(struct comedi_device *dev, uint8_t addr)
* Byte0 = Not sent.
*/
if (s626_i2c_handshake(dev, S626_I2C_B2(S626_I2C_ATTRSTART,
(devpriv->i2c_adrs | 1)) |
(devpriv->i2c_adrs | 1)) |
S626_I2C_B1(S626_I2C_ATTRSTOP, 0) |
S626_I2C_B0(S626_I2C_ATTRNOP, 0)))
/* Abort function and declare error if handshake failed. */
......@@ -517,8 +517,8 @@ static int s626_send_dac(struct comedi_device *dev, uint32_t val)
/*
* Private helper function: Write setpoint to an application DAC channel.
*/
static int s626_set_dac(struct comedi_device *dev, uint16_t chan,
int16_t dacdata)
static int s626_set_dac(struct comedi_device *dev,
uint16_t chan, int16_t dacdata)
{
struct s626_private *devpriv = dev->private;
uint16_t signmask;
......@@ -583,8 +583,8 @@ static int s626_set_dac(struct comedi_device *dev, uint16_t chan,
return s626_send_dac(dev, val);
}
static int s626_write_trim_dac(struct comedi_device *dev, uint8_t logical_chan,
uint8_t dac_data)
static int s626_write_trim_dac(struct comedi_device *dev,
uint8_t logical_chan, uint8_t dac_data)
{
struct s626_private *devpriv = dev->private;
uint32_t chan;
......@@ -641,7 +641,7 @@ static int s626_load_trim_dacs(struct comedi_device *dev)
/* Copy TrimDac setpoint values from EEPROM to TrimDacs. */
for (i = 0; i < ARRAY_SIZE(s626_trimchan); i++) {
ret = s626_write_trim_dac(dev, i,
s626_i2c_read(dev, s626_trimadrs[i]));
s626_i2c_read(dev, s626_trimadrs[i]));
if (ret)
return ret;
}
......@@ -2729,7 +2729,7 @@ static int s626_initialize(struct comedi_device *dev)
}
static int s626_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct s626_private *devpriv;
......
......@@ -633,8 +633,8 @@ static int receive_dux_commands(struct comedi_device *dev, unsigned int command)
for (i = 0; i < RETRIES; i++) {
ret = usb_bulk_msg(usb, usb_rcvbulkpipe(usb, 8),
devpriv->insn_buf, SIZEINSNBUF,
&nrec, BULK_TIMEOUT);
devpriv->insn_buf, SIZEINSNBUF,
&nrec, BULK_TIMEOUT);
if (ret < 0)
return ret;
if (le16_to_cpu(devpriv->insn_buf[0]) == command)
......
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