Staging Comedi: fix spacing around parens
authorBill Pemberton <wfp5p@virginia.edu>
Thu, 9 Apr 2009 20:07:21 +0000 (16:07 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:31 +0000 (11:00 -0700)
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
22 files changed:
drivers/staging/comedi/drivers.c
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi-data/addi_eeprom.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.h
drivers/staging/comedi/drivers/adl_pci9111.c
drivers/staging/comedi/drivers/adq12b.c
drivers/staging/comedi/drivers/adv_pci1710.c
drivers/staging/comedi/drivers/am9513.h
drivers/staging/comedi/drivers/amplc_pc236.c
drivers/staging/comedi/drivers/cb_pcidas64.c
drivers/staging/comedi/drivers/dt282x.c
drivers/staging/comedi/drivers/gsc_hpdi.c
drivers/staging/comedi/drivers/mpc624.c
drivers/staging/comedi/drivers/ni_660x.c
drivers/staging/comedi/drivers/ni_atmio16d.c
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/ni_stc.h
drivers/staging/comedi/drivers/pcmda12.c
drivers/staging/comedi/drivers/pcmmio.c
drivers/staging/comedi/drivers/pcmuio.c
drivers/staging/comedi/drivers/rtd520.c
drivers/staging/comedi/rt_pend_tq.c

index 6e13e45..cabbf09 100644 (file)
@@ -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);
 
index a35f299..f9c27ef 100644 (file)
@@ -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");
        }
index 3aa2092..3c9bb39 100644 (file)
@@ -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 */
 
index ab3a46d..fedfc9c 100644 (file)
@@ -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
 
index a792a5b..aed4a47 100644 (file)
@@ -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 */
 
index b9359c5..8fe4c0b 100644 (file)
@@ -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;
index 2df5ab0..37f1459 100644 (file)
@@ -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. */
index 386226e..73367d6 100644 (file)
                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 */
 
        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
 
index c45cbf3..4efdd12 100644 (file)
@@ -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.
index ba465c4..425c0f2 100644 (file)
@@ -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
index 643af37..6632835 100644 (file)
@@ -387,12 +387,12 @@ struct dt282x_private {
 #define wait_for(a, b)                                 \
        do{                                             \
                int _i;                                 \
-               for(_i=0;_i<DT2821_TIMEOUT;_i++){       \
-                       if(a){_i=0;break;}              \
+               for (_i=0;_i<DT2821_TIMEOUT;_i++){      \
+                       if (a){_i=0;break;}             \
                        comedi_udelay(5);                       \
                }                                       \
-               if(_i){b}                               \
-       }while(0)
+               if (_i){b}                              \
+       }while (0)
 
 static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it);
 static int dt282x_detach(struct comedi_device *dev);
@@ -1029,7 +1029,7 @@ static int dt282x_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice
                cmd->start_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)");
                }
        }
index 48491c0..d25b4c8 100644 (file)
@@ -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
index bd7cb44..a00ad1b 100644 (file)
@@ -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)
 /* ---------------------------------------------------------------------------- */
index d4a6cf3..b11f134 100644 (file)
@@ -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);
index 442bfe7..9fafe0c 100644 (file)
@@ -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;
                }
index 5c165ca..7b0030e 100644 (file)
@@ -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;
                }
index a580cf3..55c8a1d 100644 (file)
@@ -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),
index 328be7b..f2a9596 100644 (file)
@@ -55,7 +55,7 @@ Configuration Options:
 
 #include <linux/pci.h>         /* 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
index 0dc51f6..849fa4f 100644 (file)
@@ -76,7 +76,7 @@ Configuration Options:
 #include "../comedidev.h"
 #include <linux/pci.h>         /* 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
index 54971a1..7e442db 100644 (file)
@@ -79,7 +79,7 @@ Configuration Options:
 
 #include <linux/pci.h>         /* 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
index 700090d..83af347 100644 (file)
@@ -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);
index 5d2eead..f6e083d 100644 (file)
@@ -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)
 {