From 53106ae68acf6eda9593150a25fc44e30fd5ff68 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Thu, 9 Apr 2009 16:07:21 -0400 Subject: [PATCH] Staging Comedi: fix spacing around parens Signed-off-by: Bill Pemberton Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers.c | 8 +++---- .../comedi/drivers/addi-data/addi_common.c | 2 +- .../comedi/drivers/addi-data/addi_eeprom.c | 6 ++--- .../comedi/drivers/addi-data/hwdrv_apci3120.h | 2 +- drivers/staging/comedi/drivers/adl_pci9111.c | 6 ++--- drivers/staging/comedi/drivers/adq12b.c | 22 +++++++++---------- drivers/staging/comedi/drivers/adv_pci1710.c | 10 ++++----- drivers/staging/comedi/drivers/am9513.h | 8 +++---- drivers/staging/comedi/drivers/amplc_pc236.c | 8 +++---- drivers/staging/comedi/drivers/cb_pcidas64.c | 2 +- drivers/staging/comedi/drivers/dt282x.c | 12 +++++----- drivers/staging/comedi/drivers/gsc_hpdi.c | 2 +- drivers/staging/comedi/drivers/mpc624.c | 8 +++---- drivers/staging/comedi/drivers/ni_660x.c | 8 +++---- drivers/staging/comedi/drivers/ni_atmio16d.c | 8 +++---- .../staging/comedi/drivers/ni_mio_common.c | 12 +++++----- drivers/staging/comedi/drivers/ni_stc.h | 2 +- drivers/staging/comedi/drivers/pcmda12.c | 2 +- drivers/staging/comedi/drivers/pcmmio.c | 2 +- drivers/staging/comedi/drivers/pcmuio.c | 2 +- drivers/staging/comedi/drivers/rtd520.c | 14 ++++++------ drivers/staging/comedi/rt_pend_tq.c | 4 ++-- 22 files changed, 75 insertions(+), 75 deletions(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index 6e13e450dc7..cabbf090f60 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -198,7 +198,7 @@ int comedi_driver_unregister(struct comedi_driver *driver) struct comedi_device_file_info *dev_file_info = comedi_get_device_file_info(i); struct comedi_device *dev; - if(dev_file_info == NULL) continue; + if (dev_file_info == NULL) continue; dev = dev_file_info->device; mutex_lock(&dev->mutex); @@ -801,7 +801,7 @@ int comedi_auto_config(struct device *hardware_device, const char *board_name, c } minor = comedi_alloc_board_minor(hardware_device); - if(minor < 0) return minor; + if (minor < 0) return minor; private_data = kmalloc(sizeof(unsigned), GFP_KERNEL); if (private_data == NULL) { @@ -824,7 +824,7 @@ int comedi_auto_config(struct device *hardware_device, const char *board_name, c mutex_unlock(&dev_file_info->device->mutex); cleanup: - if(retval < 0) + if (retval < 0) { kfree(private_data); comedi_free_board_minor(minor); @@ -835,7 +835,7 @@ cleanup: void comedi_auto_unconfig(struct device *hardware_device) { unsigned *minor = (unsigned *)dev_get_drvdata(hardware_device); - if(minor == NULL) return; + if (minor == NULL) return; BUG_ON(*minor >= COMEDI_NUM_BOARD_MINORS); diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index a35f299f2a2..f9c27efe1dc 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -2638,7 +2638,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it) devpriv->i_IobaseReserved = (int) io_addr[3]; printk("\nioremap begin"); devpriv->dw_AiBase = - (unsigned long ) ioremap(io_addr[3], + (unsigned long) ioremap(io_addr[3], this_board->i_IorangeBase3); printk("\nioremap end"); } diff --git a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c index 3aa20928e67..3c9bb3962c5 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c @@ -45,9 +45,9 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc +----------+-----------+------------------------------------------------+ */ -#define NVCMD_BEGIN_READ (0x7 << 5 ) /* nvRam begin read command */ -#define NVCMD_LOAD_LOW (0x4 << 5 ) /* nvRam load low command */ -#define NVCMD_LOAD_HIGH (0x5 << 5 ) /* nvRam load high command */ +#define NVCMD_BEGIN_READ (0x7 << 5) /* nvRam begin read command */ +#define NVCMD_LOAD_LOW (0x4 << 5) /* nvRam load low command */ +#define NVCMD_LOAD_HIGH (0x5 << 5) /* nvRam load high command */ #define EE76_CMD_LEN 13 /* bits in instructions */ #define EE_READ 0x0180 /* 01 1000 0000 read instruction */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h index ab3a46dc133..fedfc9c58a8 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h @@ -161,7 +161,7 @@ static const struct comedi_lrange range_apci3120_ao = { 2, { #define APCI3120_TIMER2_SELECT_EOS 0xC0 /* ADDED on 20-6 */ #define APCI3120_COUNTER 3 /* on 20-6 */ -#define APCI3120_DISABLE_ALL_TIMER ( APCI3120_DISABLE_TIMER0 & APCI3120_DISABLE_TIMER1 & APCI3120_DISABLE_TIMER2 ) /* on 20-6 */ +#define APCI3120_DISABLE_ALL_TIMER (APCI3120_DISABLE_TIMER0 & APCI3120_DISABLE_TIMER1 & APCI3120_DISABLE_TIMER2) /* on 20-6 */ #define MAX_ANALOGINPUT_CHANNELS 32 diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index a792a5b33e6..aed4a47a798 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -252,15 +252,15 @@ TODO: #define pci9111_8254_counter_0_set(data) \ outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \ - outb( (data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0) + outb((data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0) #define pci9111_8254_counter_1_set(data) \ outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1); \ - outb( (data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1) + outb((data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_1) #define pci9111_8254_counter_2_set(data) \ outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2); \ - outb( (data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2) + outb((data >> 8) & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_2) /* Function prototypes */ diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index b9359c57248..8fe4c0b0e8f 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c @@ -101,17 +101,17 @@ If you do not specify any options, they will default to // available ranges through the PGA gains static const struct comedi_lrange range_adq12b_ai_bipolar = { 4, { - BIP_RANGE( 5 ), - BIP_RANGE( 2 ), - BIP_RANGE( 1 ), - BIP_RANGE( 0.5 ) + BIP_RANGE(5), + BIP_RANGE(2), + BIP_RANGE(1), + BIP_RANGE(0.5) }}; static const struct comedi_lrange range_adq12b_ai_unipolar = { 4, { - UNI_RANGE( 5 ), - UNI_RANGE( 2 ), - UNI_RANGE( 1 ), - UNI_RANGE( 0.5 ) + UNI_RANGE(5), + UNI_RANGE(2), + UNI_RANGE(1), + UNI_RANGE(0.5) }}; @@ -219,7 +219,7 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) * Allocate the private structure area. alloc_private() is a * convenient macro defined in comedidev.h. */ - if(alloc_private(dev, sizeof(struct adq12b_private)) < 0) + if (alloc_private (dev, sizeof (struct adq12b_private)) < 0) return -ENOMEM; /* fill in devpriv structure */ @@ -236,7 +236,7 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) * Allocate the subdevice structures. alloc_subdevice() is a * convenient macro defined in comedidev.h. */ - if(alloc_subdevices(dev, 3)<0) + if (alloc_subdevices (dev, 3)<0) return -ENOMEM; s = dev->subdevices+0; @@ -332,7 +332,7 @@ static int adq12b_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s status = inb(dev->iobase + ADQ12B_ADLOW); /* convert n samples */ - for(n=0; n < insn->n; n++){ + for (n=0; n < insn->n; n++){ /* wait for end of convertion */ i = 0; diff --git a/drivers/staging/comedi/drivers/adv_pci1710.c b/drivers/staging/comedi/drivers/adv_pci1710.c index 2df5ab0eaee..37f1459d152 100644 --- a/drivers/staging/comedi/drivers/adv_pci1710.c +++ b/drivers/staging/comedi/drivers/adv_pci1710.c @@ -1347,20 +1347,20 @@ static int pci1710_attach(struct comedi_device *dev, struct comedi_devconfig *it board_index = this_board - boardtypes; while (NULL != (pcidev = pci_get_device(PCI_VENDOR_ID_ADVANTECH, PCI_ANY_ID, pcidev))) { - if(strcmp(this_board->name, DRV_NAME) == 0) + if (strcmp (this_board->name, DRV_NAME) == 0) { - for(i = 0; i < n_boardtypes; ++i) + for (i = 0; i < n_boardtypes; ++i) { - if(pcidev->device == boardtypes[i].device_id) + if (pcidev->device == boardtypes[i].device_id) { board_index = i; break; } } - if(i == n_boardtypes) continue; + if (i == n_boardtypes) continue; }else { - if(pcidev->device != boardtypes[board_index].device_id) continue; + if (pcidev->device != boardtypes[board_index].device_id) continue; } /* Found matching vendor/device. */ diff --git a/drivers/staging/comedi/drivers/am9513.h b/drivers/staging/comedi/drivers/am9513.h index 386226e5b17..73367d6afff 100644 --- a/drivers/staging/comedi/drivers/am9513.h +++ b/drivers/staging/comedi/drivers/am9513.h @@ -51,14 +51,14 @@ Am9513_output_control(reg); \ Am9513_output_data(val>>8); \ Am9513_output_data(val&0xff); \ - }while(0) + }while (0) #define Am9513_read_register(reg, val) \ do{ \ Am9513_output_control(reg); \ val=Am9513_input_data()<<8; \ val|=Am9513_input_data(); \ - }while(0) + }while (0) #else /* Am9513_16BITBUS */ @@ -66,13 +66,13 @@ do{ \ Am9513_output_control(reg); \ Am9513_output_data(val); \ - }while(0) + }while (0) #define Am9513_read_register(reg, val) \ do{ \ Am9513_output_control(reg); \ val=Am9513_input_data(); \ - }while(0) + }while (0) #endif diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c index c45cbf36f1e..4efdd125963 100644 --- a/drivers/staging/comedi/drivers/amplc_pc236.c +++ b/drivers/staging/comedi/drivers/amplc_pc236.c @@ -77,19 +77,19 @@ unused. * INTCSR values for PCI236. */ /* Disable interrupt, also clear any interrupt there */ -#define PCI236_INTR_DISABLE ( PLX9052_INTCSR_LI1ENAB_DISABLED \ +#define PCI236_INTR_DISABLE (PLX9052_INTCSR_LI1ENAB_DISABLED \ | PLX9052_INTCSR_LI1POL_HIGH \ | PLX9052_INTCSR_LI2POL_HIGH \ | PLX9052_INTCSR_PCIENAB_DISABLED \ | PLX9052_INTCSR_LI1SEL_EDGE \ - | PLX9052_INTCSR_LI1CLRINT_ASSERTED ) + | PLX9052_INTCSR_LI1CLRINT_ASSERTED) /* Enable interrupt, also clear any interrupt there. */ -#define PCI236_INTR_ENABLE ( PLX9052_INTCSR_LI1ENAB_ENABLED \ +#define PCI236_INTR_ENABLE (PLX9052_INTCSR_LI1ENAB_ENABLED \ | PLX9052_INTCSR_LI1POL_HIGH \ | PLX9052_INTCSR_LI2POL_HIGH \ | PLX9052_INTCSR_PCIENAB_ENABLED \ | PLX9052_INTCSR_LI1SEL_EDGE \ - | PLX9052_INTCSR_LI1CLRINT_ASSERTED ) + | PLX9052_INTCSR_LI1CLRINT_ASSERTED) /* * Board descriptions for Amplicon PC36AT and PCI236. diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index ba465c43240..425c0f29645 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -98,7 +98,7 @@ TODO: /* #define PCIDAS64_DEBUG enable debugging code */ #ifdef PCIDAS64_DEBUG -#define DEBUG_PRINT(format, args...) rt_printk(format , ## args ) +#define DEBUG_PRINT(format, args...) rt_printk(format , ## args) #else #define DEBUG_PRINT(format, args...) #endif diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c index 643af376087..66328353fda 100644 --- a/drivers/staging/comedi/drivers/dt282x.c +++ b/drivers/staging/comedi/drivers/dt282x.c @@ -387,12 +387,12 @@ struct dt282x_private { #define wait_for(a, b) \ do{ \ int _i; \ - for(_i=0;_istart_arg = 0; err++; } - if (cmd->scan_begin_arg < 5000 /* XXX unknown */ ) { + if (cmd->scan_begin_arg < 5000 /* XXX unknown */) { cmd->scan_begin_arg = 5000; err++; } @@ -1302,7 +1302,7 @@ static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it) irq = probe_irq_off(irqs); restore_flags(flags); - if (0 /* error */ ) { + if (0 /* error */) { printk(" error probing irq (bad)"); } } diff --git a/drivers/staging/comedi/drivers/gsc_hpdi.c b/drivers/staging/comedi/drivers/gsc_hpdi.c index 48491c09e7f..d25b4c8aeae 100644 --- a/drivers/staging/comedi/drivers/gsc_hpdi.c +++ b/drivers/staging/comedi/drivers/gsc_hpdi.c @@ -66,7 +66,7 @@ static int dio_config_block_size(struct comedi_device * dev, unsigned int * data /* #define HPDI_DEBUG enable debugging code */ #ifdef HPDI_DEBUG -#define DEBUG_PRINT(format, args...) rt_printk(format , ## args ) +#define DEBUG_PRINT(format, args...) rt_printk(format , ## args) #else #define DEBUG_PRINT(format, args...) #endif diff --git a/drivers/staging/comedi/drivers/mpc624.c b/drivers/staging/comedi/drivers/mpc624.c index bd7cb4406e1..a00ad1b63ed 100644 --- a/drivers/staging/comedi/drivers/mpc624.c +++ b/drivers/staging/comedi/drivers/mpc624.c @@ -110,13 +110,13 @@ Configuration Options: */ #define MPC624_SPEED_3_52_kHz (MPC624_OSR4 | MPC624_OSR0) -#define MPC624_SPEED_1_76_kHz (MPC624_OSR4 | MPC624_OSR1 ) +#define MPC624_SPEED_1_76_kHz (MPC624_OSR4 | MPC624_OSR1) #define MPC624_SPEED_880_Hz (MPC624_OSR4 | MPC624_OSR1 | MPC624_OSR0) -#define MPC624_SPEED_440_Hz (MPC624_OSR4 | MPC624_OSR2 ) +#define MPC624_SPEED_440_Hz (MPC624_OSR4 | MPC624_OSR2) #define MPC624_SPEED_220_Hz (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR0) -#define MPC624_SPEED_110_Hz (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR1 ) +#define MPC624_SPEED_110_Hz (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR1) #define MPC624_SPEED_55_Hz (MPC624_OSR4 | MPC624_OSR2 | MPC624_OSR1 | MPC624_OSR0) -#define MPC624_SPEED_27_5_Hz (MPC624_OSR4 | MPC624_OSR3 ) +#define MPC624_SPEED_27_5_Hz (MPC624_OSR4 | MPC624_OSR3) #define MPC624_SPEED_13_75_Hz (MPC624_OSR4 | MPC624_OSR3 | MPC624_OSR0) #define MPC624_SPEED_6_875_Hz (MPC624_OSR4 | MPC624_OSR3 | MPC624_OSR2 | MPC624_OSR1 | MPC624_OSR0) /* ---------------------------------------------------------------------------- */ diff --git a/drivers/staging/comedi/drivers/ni_660x.c b/drivers/staging/comedi/drivers/ni_660x.c index d4a6cf3dde6..b11f134e8c7 100644 --- a/drivers/staging/comedi/drivers/ni_660x.c +++ b/drivers/staging/comedi/drivers/ni_660x.c @@ -1161,7 +1161,7 @@ static void init_tio_chip(struct comedi_device *dev, int chipset) ni_660x_write_register(dev, chipset, private(dev)->dma_configuration_soft_copies[chipset], DMAConfigRegister); - for(i = 0; i < NUM_PFI_CHANNELS; ++i) + for (i = 0; i < NUM_PFI_CHANNELS; ++i) { ni_660x_write_register(dev, chipset, 0, IOConfigReg(i)); } @@ -1237,8 +1237,8 @@ static void ni_660x_select_pfi_output(struct comedi_device *dev, unsigned pfi_ch unsigned active_bits; unsigned idle_bits; - if(board(dev)->n_chips > 1) { - if(output_select == pfi_output_select_counter && + if (board (dev)->n_chips > 1) { + if (output_select == pfi_output_select_counter && pfi_channel >= counter_4_7_first_pfi && pfi_channel <= counter_4_7_last_pfi) { active_chipset = 1; @@ -1249,7 +1249,7 @@ static void ni_660x_select_pfi_output(struct comedi_device *dev, unsigned pfi_ch } } - if(idle_chipset != active_chipset) { + if (idle_chipset != active_chipset) { idle_bits = ni_660x_read_register(dev, idle_chipset, IOConfigReg(pfi_channel)); idle_bits &= ~pfi_output_select_mask(pfi_channel); idle_bits |= pfi_output_select_bits(pfi_channel, pfi_output_select_high_Z); diff --git a/drivers/staging/comedi/drivers/ni_atmio16d.c b/drivers/staging/comedi/drivers/ni_atmio16d.c index 442bfe717a1..9fafe0c234d 100644 --- a/drivers/staging/comedi/drivers/ni_atmio16d.c +++ b/drivers/staging/comedi/drivers/ni_atmio16d.c @@ -417,10 +417,10 @@ static int atmio16d_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s } else if (cmd->convert_arg < 655360000) { base_clock = CLOCK_100_KHZ; timer = cmd->convert_arg / 10000; - } else if (cmd->convert_arg <= 0xffffffff /* 6553600000 */ ) { + } else if (cmd->convert_arg <= 0xffffffff /* 6553600000 */) { base_clock = CLOCK_10_KHZ; timer = cmd->convert_arg / 100000; - } else if (cmd->convert_arg <= 0xffffffff /* 65536000000 */ ) { + } else if (cmd->convert_arg <= 0xffffffff /* 65536000000 */) { base_clock = CLOCK_1_KHZ; timer = cmd->convert_arg / 1000000; } @@ -483,10 +483,10 @@ static int atmio16d_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s } else if (cmd->scan_begin_arg < 655360000) { base_clock = CLOCK_100_KHZ; timer = cmd->scan_begin_arg / 10000; - } else if (cmd->scan_begin_arg < 0xffffffff /* 6553600000 */ ) { + } else if (cmd->scan_begin_arg < 0xffffffff /* 6553600000 */) { base_clock = CLOCK_10_KHZ; timer = cmd->scan_begin_arg / 100000; - } else if (cmd->scan_begin_arg < 0xffffffff /* 65536000000 */ ) { + } else if (cmd->scan_begin_arg < 0xffffffff /* 65536000000 */) { base_clock = CLOCK_1_KHZ; timer = cmd->scan_begin_arg / 1000000; } diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 5c165cac234..7b0030e853c 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -1554,7 +1554,7 @@ static int ni_ai_setup_MITE_dma(struct comedi_device *dev) comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz); comedi_spin_lock_irqsave(&devpriv->mite_channel_lock, flags); - if(devpriv->ai_mite_chan == NULL) + if (devpriv->ai_mite_chan == NULL) { comedi_spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags); return -EIO; @@ -2810,7 +2810,7 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device *dev, int i; int invert = 0; - if(timed) { + if (timed) { for (i = 0; i < boardtype.n_aochan; ++i) { devpriv->ao_conf[i] &= ~MSeries_AO_Update_Timed_Bit; ni_writeb(devpriv->ao_conf[i], M_Offset_AO_Config_Bank(i)); @@ -2970,11 +2970,11 @@ static int ni_ao_insn_config(struct comedi_device *dev, struct comedi_subdevice { switch (data[0]) { case INSN_CONFIG_GET_HARDWARE_BUFFER_SIZE: - switch(data[1]) + switch (data[1]) { case COMEDI_OUTPUT: data[2] = 1 + boardtype.ao_fifo_depth * sizeof(short); - if(devpriv->mite) data[2] += devpriv->mite->fifo_size; + if (devpriv->mite) data[2] += devpriv->mite->fifo_size; break; case COMEDI_INPUT: data[2] = 0; @@ -3139,7 +3139,7 @@ static int ni_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s) devpriv->stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register); switch (cmd->stop_src) { case TRIG_COUNT: - if(boardtype.reg_type & ni_reg_m_series_mask) + if (boardtype.reg_type & ni_reg_m_series_mask) { /* this is how the NI example code does it for m-series boards, verified correct with 6259 */ devpriv->stc_writel(dev, cmd->stop_arg - 1, AO_UC_Load_A_Register); @@ -3422,7 +3422,7 @@ static int ni_ao_reset(struct comedi_device *dev, struct comedi_subdevice *s) if (boardtype.reg_type & ni_reg_6xxx_mask) { unsigned immediate_bits = 0; unsigned i; - for(i = 0; i < s->n_chan; ++i) + for (i = 0; i < s->n_chan; ++i) { immediate_bits |= 1 << i; } diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h index a580cf351bd..55c8a1d6686 100644 --- a/drivers/staging/comedi/drivers/ni_stc.h +++ b/drivers/staging/comedi/drivers/ni_stc.h @@ -262,7 +262,7 @@ enum Joint_Status_2_Bits { #define AO_Trigger_Once _bit0 #define AO_Mode_2_Register 39 -#define AO_FIFO_Mode_Mask ( 0x3 << 14 ) +#define AO_FIFO_Mode_Mask (0x3 << 14) enum AO_FIFO_Mode_Bits { AO_FIFO_Mode_HF_to_F = (3 << 14), AO_FIFO_Mode_F = (2 << 14), diff --git a/drivers/staging/comedi/drivers/pcmda12.c b/drivers/staging/comedi/drivers/pcmda12.c index 328be7bd501..f2a959654d6 100644 --- a/drivers/staging/comedi/drivers/pcmda12.c +++ b/drivers/staging/comedi/drivers/pcmda12.c @@ -55,7 +55,7 @@ Configuration Options: #include /* for PCI devices */ -#define MIN(a, b) ( ((a) < (b)) ? (a) : (b) ) +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define SDEV_NO ((int)(s - dev->subdevices)) #define CHANS 8 #define IOSIZE 16 diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index 0dc51f62bac..849fa4fa4ce 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c @@ -76,7 +76,7 @@ Configuration Options: #include "../comedidev.h" #include /* for PCI devices */ -#define MIN(a, b) ( ((a) < (b)) ? (a) : (b) ) +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) /* This stuff is all from pcmuio.c -- it refers to the DIO subdevices only */ #define CHANS_PER_PORT 8 diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c index 54971a1cb90..7e442dbd2c1 100644 --- a/drivers/staging/comedi/drivers/pcmuio.c +++ b/drivers/staging/comedi/drivers/pcmuio.c @@ -79,7 +79,7 @@ Configuration Options: #include /* for PCI devices */ -#define MIN(a, b) ( ((a) < (b)) ? (a) : (b) ) +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define CHANS_PER_PORT 8 #define PORTS_PER_ASIC 6 #define INTR_PORTS_PER_ASIC 3 diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index 700090dc2a8..83af347934b 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -757,15 +757,15 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it) continue; } } - for(i = 0; i < sizeof(rtd520Boards) / sizeof(rtd520Boards[0]); ++i) + for (i = 0; i < sizeof (rtd520Boards) / sizeof (rtd520Boards[0]); ++i) { - if(pcidev->device == rtd520Boards[i].device_id) + if (pcidev->device == rtd520Boards[i].device_id) { dev->board_ptr = &rtd520Boards[i]; break; } } - if(dev->board_ptr) break; /* found one */ + if (dev->board_ptr) break; /* found one */ } if (!pcidev) { if (it->options[0] && it->options[1]) { @@ -931,7 +931,7 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it) printk("( irq=%u )", dev->irq); ret = rtd520_probe_fifo_depth(dev); - if(ret < 0) { + if (ret < 0) { return ret; } devpriv->fifoLen = ret; @@ -1226,18 +1226,18 @@ static int rtd520_probe_fifo_depth(struct comedi_device *dev) RtdAdcStart(dev); comedi_udelay(1); fifo_status = RtdFifoStatus(dev); - if((fifo_status & FS_ADC_HEMPTY) == 0) { + if ((fifo_status & FS_ADC_HEMPTY) == 0) { fifo_size = 2 * i; break; } } - if(i == limit) + if (i == limit) { rt_printk("\ncomedi: %s: failed to probe fifo size.\n", DRV_NAME); return -EIO; } RtdAdcClearFifo(dev); - if(fifo_size != 0x400 && fifo_size != 0x2000) + if (fifo_size != 0x400 && fifo_size != 0x2000) { rt_printk("\ncomedi: %s: unexpected fifo size of %i, expected 1024 or 8192.\n", DRV_NAME, fifo_size); diff --git a/drivers/staging/comedi/rt_pend_tq.c b/drivers/staging/comedi/rt_pend_tq.c index 5d2eead99f2..f6e083d553d 100644 --- a/drivers/staging/comedi/rt_pend_tq.c +++ b/drivers/staging/comedi/rt_pend_tq.c @@ -28,8 +28,8 @@ int rt_pend_tq_irq = 0; DEFINE_SPINLOCK(rt_pend_tq_lock); /* WARNING: following code not checked against race conditions yet. */ -#define INC_CIRCULAR_PTR(ptr, begin, size) do {if(++(ptr)>=(begin)+(size)) (ptr)=(begin); } while(0) -#define DEC_CIRCULAR_PTR(ptr, begin, size) do {if(--(ptr)<(begin)) (ptr)=(begin)+(size)-1; } while(0) +#define INC_CIRCULAR_PTR (ptr, begin, size) do {if (++ (ptr)>= (begin)+ (size)) (ptr)= (begin); } while (0) +#define DEC_CIRCULAR_PTR (ptr, begin, size) do {if (-- (ptr)< (begin)) (ptr)= (begin)+ (size)-1; } while (0) int rt_pend_call(void (*func) (int arg1, void *arg2), int arg1, void *arg2) { -- 2.39.5