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

Staging: comedi: Add spaces after commas

Signed-off-by: default avatarBill Pemberton <wfp5p@virginia.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent da91b269
......@@ -187,24 +187,24 @@ Configuration options:
(inb(PCI9111_IO_BASE+PCI9111_REGISTER_AD_MODE_INTERRUPT_READBACK)&0x0F)
#define pci9111_trigger_and_autoscan_set(flags) \
outb(flags,PCI9111_IO_BASE+PCI9111_REGISTER_TRIGGER_MODE_CONTROL)
outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_TRIGGER_MODE_CONTROL)
#define pci9111_interrupt_and_fifo_get() \
((inb(PCI9111_IO_BASE+PCI9111_REGISTER_AD_MODE_INTERRUPT_READBACK) >> 4) &0x03)
#define pci9111_interrupt_and_fifo_set(flags) \
outb(flags,PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL)
outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL)
#define pci9111_interrupt_clear() \
outb(0,PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CLEAR)
outb(0, PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CLEAR)
#define pci9111_software_trigger() \
outb(0,PCI9111_IO_BASE+PCI9111_REGISTER_SOFTWARE_TRIGGER)
outb(0, PCI9111_IO_BASE+PCI9111_REGISTER_SOFTWARE_TRIGGER)
#define pci9111_fifo_reset() \
outb(PCI9111_FFEN_SET_FIFO_ENABLE,PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
outb(PCI9111_FFEN_SET_FIFO_DISABLE,PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
outb(PCI9111_FFEN_SET_FIFO_ENABLE,PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL)
outb(PCI9111_FFEN_SET_FIFO_ENABLE, PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
outb(PCI9111_FFEN_SET_FIFO_DISABLE, PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL); \
outb(PCI9111_FFEN_SET_FIFO_ENABLE, PCI9111_IO_BASE+PCI9111_REGISTER_INTERRUPT_CONTROL)
#define pci9111_is_fifo_full() \
((inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK)& \
......@@ -219,13 +219,13 @@ Configuration options:
PCI9111_FIFO_EMPTY_MASK)==0)
#define pci9111_ai_channel_set(channel) \
outb((channel)&PCI9111_CHANNEL_MASK,PCI9111_IO_BASE+PCI9111_REGISTER_AD_CHANNEL_CONTROL)
outb((channel)&PCI9111_CHANNEL_MASK, PCI9111_IO_BASE+PCI9111_REGISTER_AD_CHANNEL_CONTROL)
#define pci9111_ai_channel_get() \
inb(PCI9111_IO_BASE+PCI9111_REGISTER_AD_CHANNEL_READBACK)&PCI9111_CHANNEL_MASK
#define pci9111_ai_range_set(range) \
outb((range)&PCI9111_RANGE_MASK,PCI9111_IO_BASE+PCI9111_REGISTER_INPUT_SIGNAL_RANGE)
outb((range)&PCI9111_RANGE_MASK, PCI9111_IO_BASE+PCI9111_REGISTER_INPUT_SIGNAL_RANGE)
#define pci9111_ai_range_get() \
inb(PCI9111_IO_BASE+PCI9111_REGISTER_RANGE_STATUS_READBACK)&PCI9111_RANGE_MASK
......@@ -239,16 +239,16 @@ Configuration options:
^ PCI9111_HR_AI_RESOLUTION_2_CMP_BIT
#define pci9111_ao_set_data(data) \
outw(data&PCI9111_AO_RESOLUTION_MASK,PCI9111_IO_BASE+PCI9111_REGISTER_DA_OUTPUT)
outw(data&PCI9111_AO_RESOLUTION_MASK, PCI9111_IO_BASE+PCI9111_REGISTER_DA_OUTPUT)
#define pci9111_di_get_bits() \
inw(PCI9111_IO_BASE+PCI9111_REGISTER_DIGITAL_IO)
#define pci9111_do_set_bits(bits) \
outw(bits,PCI9111_IO_BASE+PCI9111_REGISTER_DIGITAL_IO)
outw(bits, PCI9111_IO_BASE+PCI9111_REGISTER_DIGITAL_IO)
#define pci9111_8254_control_set(flags) \
outb(flags,PCI9111_IO_BASE+PCI9111_REGISTER_8254_CONTROL)
outb(flags, PCI9111_IO_BASE+PCI9111_REGISTER_8254_CONTROL)
#define pci9111_8254_counter_0_set(data) \
outb(data & 0xFF, PCI9111_IO_BASE+PCI9111_REGISTER_8254_COUNTER_0); \
......@@ -536,7 +536,7 @@ static int pci9111_ai_cancel(struct comedi_device *dev, struct comedi_subdevice
/* Test analog input command */
#define pci9111_check_trigger_src(src,flags) \
#define pci9111_check_trigger_src(src, flags) \
tmp = src; \
src &= flags; \
if (!src || tmp != src) error++
......
......@@ -162,7 +162,7 @@ struct adq12b_private {
* the board, and also about the kernel module that contains
* the device code.
*/
static int adq12b_attach(struct comedi_device *dev,struct comedi_devconfig *it);
static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it);
static int adq12b_detach(struct comedi_device *dev);
static struct comedi_driver driver_adq12b={
driver_name: "adq12b",
......@@ -174,9 +174,9 @@ static struct comedi_driver driver_adq12b={
num_names: sizeof(adq12b_boards) / sizeof(struct adq12b_board),
};
static int adq12b_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data);
static int adq12b_di_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data);
static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data);
static int adq12b_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
static int adq12b_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
static int adq12b_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
/*
* Attach is called by the Comedi core to configure the driver
......@@ -184,7 +184,7 @@ static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice
* in the driver structure, dev->board_ptr contains that
* address.
*/
static int adq12b_attach(struct comedi_device *dev,struct comedi_devconfig *it)
static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
struct comedi_subdevice *s;
unsigned long iobase;
......@@ -194,7 +194,7 @@ static int adq12b_attach(struct comedi_device *dev,struct comedi_devconfig *it)
unipolar = it->options[1];
differential = it->options[2];
printk("comedi%d: adq12b called with options base=0x%03lx, %s and %s\n",dev->minor, iobase, (unipolar==1)?"unipolar":"bipolar", (differential==1)?"differential":"single-ended");
printk("comedi%d: adq12b called with options base=0x%03lx, %s and %s\n", dev->minor, iobase, (unipolar==1)?"unipolar":"bipolar", (differential==1) ? "differential" : "single-ended");
/* if no address was specified, try the default 0x300 */
if (iobase == 0) {
......@@ -304,7 +304,7 @@ static int adq12b_detach(struct comedi_device *dev)
kfree(devpriv);
printk("comedi%d: adq12b: removed\n",dev->minor);
printk("comedi%d: adq12b: removed\n", dev->minor);
return 0;
}
......@@ -314,7 +314,7 @@ static int adq12b_detach(struct comedi_device *dev)
* mode.
*/
static int adq12b_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)
static int adq12b_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int n, i;
int range, channel;
......@@ -357,7 +357,7 @@ static int adq12b_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,
}
static int adq12b_di_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data)
static int adq12b_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
/* only bits 0-4 have information about digital inputs */
......@@ -367,7 +367,7 @@ static int adq12b_di_insn_bits(struct comedi_device *dev,struct comedi_subdevice
}
static int adq12b_do_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_insn *insn,unsigned int *data)
static int adq12b_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
{
int channel;
......
......@@ -46,14 +46,14 @@
#ifdef Am9513_8BITBUS
#define Am9513_write_register(reg,val) \
#define Am9513_write_register(reg, val) \
do{ \
Am9513_output_control(reg); \
Am9513_output_data(val>>8); \
Am9513_output_data(val&0xff); \
}while(0)
#define Am9513_read_register(reg,val) \
#define Am9513_read_register(reg, val) \
do{ \
Am9513_output_control(reg); \
val=Am9513_input_data()<<8; \
......@@ -62,13 +62,13 @@
#else /* Am9513_16BITBUS */
#define Am9513_write_register(reg,val) \
#define Am9513_write_register(reg, val) \
do{ \
Am9513_output_control(reg); \
Am9513_output_data(val); \
}while(0)
#define Am9513_read_register(reg,val) \
#define Am9513_read_register(reg, val) \
do{ \
Am9513_output_control(reg); \
val=Am9513_input_data(); \
......
......@@ -415,9 +415,9 @@ static void board_init(struct comedi_device *dev)
static const struct pnp_device_id c6xdigio_pnp_tbl[] = {
/* Standard LPT Printer Port */
{.id = "PNP0400",.driver_data = 0},
{.id = "PNP0400", .driver_data = 0},
/* ECP Printer Port */
{.id = "PNP0401",.driver_data = 0},
{.id = "PNP0401", .driver_data = 0},
{}
};
......
......@@ -70,11 +70,11 @@ Configuration options:
#define RTLINUX_VERSION_CODE 0
#endif
#ifndef RTLINUX_VERSION
#define RTLINUX_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
#define RTLINUX_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
#endif
/* begin hack to workaround broken HRT_TO_8254() function on rtlinux */
#if RTLINUX_VERSION_CODE <= RTLINUX_VERSION(3,0,100)
#if RTLINUX_VERSION_CODE <= RTLINUX_VERSION(3, 0, 100)
/* this function sole purpose is to divide a long long by 838 */
static inline RTIME nano2count(long long ns)
{
......@@ -97,8 +97,8 @@ static inline RTIME nano2count(long long ns)
#define rt_task_wait_period() rt_task_wait()
#define rt_pend_linux_srq(irq) rtl_global_pend_irq(irq)
#define rt_free_srq(irq) rtl_free_soft_irq(irq)
#define rt_request_srq(x,y,z) rtl_get_soft_irq(y,"timer")
#define rt_task_init(a,b,c,d,e,f,g) rt_task_init(a,b,c,d,(e)+1)
#define rt_request_srq(x, y, z) rtl_get_soft_irq(y, "timer")
#define rt_task_init(a, b, c, d, e, f, g) rt_task_init(a, b, c, d, (e)+1)
#define rt_task_resume(x) rt_task_wakeup(x)
#define rt_set_oneshot_mode()
#define start_rt_timer(x)
......@@ -126,7 +126,7 @@ static inline RTIME nano2count(long long ns)
#define test3 0
#endif
#if RTAI_VERSION_CODE < RTAI_MANGLE_VERSION(3,3,0)
#if RTAI_VERSION_CODE < RTAI_MANGLE_VERSION(3, 3, 0)
#define comedi_rt_task_context_t int
#else
#define comedi_rt_task_context_t long
......
......@@ -114,8 +114,8 @@ Configuration Options:
#define DMM32AT_DIOC 0x0e
#define DMM32AT_DIOCONF 0x0f
#define dmm_inb(cdev,reg) inb((cdev->iobase)+reg)
#define dmm_outb(cdev,reg,valu) outb(valu,(cdev->iobase)+reg)
#define dmm_inb(cdev, reg) inb((cdev->iobase)+reg)
#define dmm_outb(cdev, reg, valu) outb(valu, (cdev->iobase)+reg)
/* Board register values. */
......
......@@ -374,17 +374,17 @@ struct dt282x_private {
* Some useless abstractions
*/
#define chan_to_DAC(a) ((a)&1)
#define update_dacsr(a) outw(devpriv->dacsr|(a),dev->iobase+DT2821_DACSR)
#define update_adcsr(a) outw(devpriv->adcsr|(a),dev->iobase+DT2821_ADCSR)
#define update_dacsr(a) outw(devpriv->dacsr|(a), dev->iobase+DT2821_DACSR)
#define update_adcsr(a) outw(devpriv->adcsr|(a), dev->iobase+DT2821_ADCSR)
#define mux_busy() (inw(dev->iobase+DT2821_ADCSR)&DT2821_MUXBUSY)
#define ad_done() (inw(dev->iobase+DT2821_ADCSR)&DT2821_ADDONE)
#define update_supcsr(a) outw(devpriv->supcsr|(a),dev->iobase+DT2821_SUPCSR)
#define update_supcsr(a) outw(devpriv->supcsr|(a), dev->iobase+DT2821_SUPCSR)
/*
* danger! macro abuse... a is the expression to wait on, and b is
* the statement(s) to execute if it doesn't happen.
*/
#define wait_for(a,b) \
#define wait_for(a, b) \
do{ \
int _i; \
for(_i=0;_i<DT2821_TIMEOUT;_i++){ \
......
......@@ -284,11 +284,11 @@ struct ni_private {
/* How we access registers */
#define ni_writel(a,b) (outl((a),(b)+dev->iobase))
#define ni_writel(a, b) (outl((a), (b)+dev->iobase))
#define ni_readl(a) (inl((a)+dev->iobase))
#define ni_writew(a,b) (outw((a),(b)+dev->iobase))
#define ni_writew(a, b) (outw((a), (b)+dev->iobase))
#define ni_readw(a) (inw((a)+dev->iobase))
#define ni_writeb(a,b) (outb((a),(b)+dev->iobase))
#define ni_writeb(a, b) (outb((a), (b)+dev->iobase))
#define ni_readb(a) (inb((a)+dev->iobase))
/* How we access windowed registers */
......@@ -329,11 +329,11 @@ static uint16_t ni_atmio_win_in(struct comedi_device *dev, int addr)
}
static struct pnp_device_id device_ids[] = {
{.id = "NIC1900",.driver_data = 0},
{.id = "NIC2400",.driver_data = 0},
{.id = "NIC2500",.driver_data = 0},
{.id = "NIC2600",.driver_data = 0},
{.id = "NIC2700",.driver_data = 0},
{.id = "NIC1900", .driver_data = 0},
{.id = "NIC2400", .driver_data = 0},
{.id = "NIC2500", .driver_data = 0},
{.id = "NIC2600", .driver_data = 0},
{.id = "NIC2700", .driver_data = 0},
{.id = ""}
};
......
......@@ -66,7 +66,7 @@
#include "comedi_fc.h"
#ifndef MDPRINTK
#define MDPRINTK(format,args...)
#define MDPRINTK(format, args...)
#endif
/* A timeout count */
......@@ -707,7 +707,7 @@ static uint32_t win_in2(struct comedi_device *dev, int reg)
return bits;
}
#define ao_win_out(data,addr) ni_ao_win_outw(dev,data,addr)
#define ao_win_out(data, addr) ni_ao_win_outw(dev, data, addr)
static inline void ni_ao_win_outw(struct comedi_device *dev, uint16_t data, int addr)
{
unsigned long flags;
......
......@@ -183,11 +183,11 @@ struct ni_private {
/* How we access registers */
#define ni_writel(a,b) (outl((a),(b)+dev->iobase))
#define ni_writel(a, b) (outl((a), (b)+dev->iobase))
#define ni_readl(a) (inl((a)+dev->iobase))
#define ni_writew(a,b) (outw((a),(b)+dev->iobase))
#define ni_writew(a, b) (outw((a), (b)+dev->iobase))
#define ni_readw(a) (inw((a)+dev->iobase))
#define ni_writeb(a,b) (outb((a),(b)+dev->iobase))
#define ni_writeb(a, b) (outb((a), (b)+dev->iobase))
#define ni_readb(a) (inb((a)+dev->iobase))
/* How we access windowed registers */
......
......@@ -1225,11 +1225,11 @@ struct ni_private {
/* How we access registers */
#define ni_writel(a,b) (writel((a), devpriv->mite->daq_io_addr + (b)))
#define ni_writel(a, b) (writel((a), devpriv->mite->daq_io_addr + (b)))
#define ni_readl(a) (readl(devpriv->mite->daq_io_addr + (a)))
#define ni_writew(a,b) (writew((a), devpriv->mite->daq_io_addr + (b)))
#define ni_writew(a, b) (writew((a), devpriv->mite->daq_io_addr + (b)))
#define ni_readw(a) (readw(devpriv->mite->daq_io_addr + (a)))
#define ni_writeb(a,b) (writeb((a), devpriv->mite->daq_io_addr + (b)))
#define ni_writeb(a, b) (writeb((a), devpriv->mite->daq_io_addr + (b)))
#define ni_readb(a) (readb(devpriv->mite->daq_io_addr + (a)))
/* How we access STC registers */
......
......@@ -1418,7 +1418,7 @@ struct ni_board_struct {
\
unsigned short dio_output; \
unsigned short dio_control; \
int ao0p,ao1p; \
int ao0p, ao1p; \
int lastchan; \
int last_do; \
int rt_irq; \
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -89,8 +89,8 @@ Configuration options:
#define Am9513_8BITBUS
#define Am9513_output_control(a) outb(a,dev->iobase+RTI800_9513A_CNTRL)
#define Am9513_output_data(a) outb(a,dev->iobase+RTI800_9513A_DATA)
#define Am9513_output_control(a) outb(a, dev->iobase+RTI800_9513A_CNTRL)
#define Am9513_output_data(a) outb(a, dev->iobase+RTI800_9513A_DATA)
#define Am9513_input_data() inb(dev->iobase+RTI800_9513A_DATA)
#define Am9513_input_status() inb(dev->iobase+RTI800_9513A_STATUS)
......
......@@ -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)
{
......
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