diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2009-03-27 11:29:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 11:00:30 -0700 |
commit | 2696fb57e6af653dd8b4df41b16754579f42fc78 (patch) | |
tree | 4e01f19e67a17d877982eacffe6cee821eb4f889 /drivers/staging/comedi/drivers/das16m1.c | |
parent | 70265d24e3404fe798b6edd55a02016b1edb49d7 (diff) |
Staging: comedi: Remove C99 comments
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/comedi/drivers/das16m1.c')
-rw-r--r-- | drivers/staging/comedi/drivers/das16m1.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c index 1a5cb1217938..5b1d96cea046 100644 --- a/drivers/staging/comedi/drivers/das16m1.c +++ b/drivers/staging/comedi/drivers/das16m1.c @@ -68,9 +68,9 @@ irq can be omitted, although the cmd interface will not work without it. #define DAS16M1_SIZE 16 #define DAS16M1_SIZE2 8 -#define DAS16M1_XTAL 100 //10 MHz master clock +#define DAS16M1_XTAL 100 /* 10 MHz master clock */ -#define FIFO_SIZE 1024 // 1024 sample fifo +#define FIFO_SIZE 1024 /* 1024 sample fifo */ /* CIO-DAS16_M1.pdf @@ -92,7 +92,7 @@ irq can be omitted, although the cmd interface will not work without it. */ -#define DAS16M1_AI 0 // 16-bit wide register +#define DAS16M1_AI 0 /* 16-bit wide register */ #define AI_CHAN(x) ((x) & 0xf) #define DAS16M1_CS 2 #define EXT_TRIG_BIT 0x1 @@ -159,8 +159,8 @@ struct das16m1_board { static const struct das16m1_board das16m1_boards[] = { { - name: "cio-das16/m1", // CIO-DAS16_M1.pdf - ai_speed:1000, // 1MHz max speed + name: "cio-das16/m1", /* CIO-DAS16_M1.pdf */ + ai_speed:1000, /* 1MHz max speed */ }, }; @@ -180,15 +180,15 @@ static struct comedi_driver driver_das16m1 = { struct das16m1_private_struct { unsigned int control_state; - volatile unsigned int adc_count; // number of samples completed + volatile unsigned int adc_count; /* number of samples completed */ /* initial value in lower half of hardware conversion counter, * needed to keep track of whether new count has been loaded into * counter yet (loaded by first sample conversion) */ u16 initial_hw_count; short ai_buffer[FIFO_SIZE]; - unsigned int do_bits; // saves status of digital output bits - unsigned int divisor1; // divides master clock to obtain conversion speed - unsigned int divisor2; // divides master clock to obtain conversion speed + unsigned int do_bits; /* saves status of digital output bits */ + unsigned int divisor1; /* divides master clock to obtain conversion speed */ + unsigned int divisor2; /* divides master clock to obtain conversion speed */ }; #define devpriv ((struct das16m1_private_struct *)(dev->private)) #define thisboard ((const struct das16m1_board *)(dev->board_ptr)) @@ -299,10 +299,10 @@ static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice if (err) return 4; - // check chanlist against board's peculiarities + /* check chanlist against board's peculiarities */ if (cmd->chanlist && cmd->chanlist_len > 1) { for (i = 0; i < cmd->chanlist_len; i++) { - // even/odd channels must go into even/odd queue addresses + /* even/odd channels must go into even/odd queue addresses */ if ((i % 2) != (CR_CHAN(cmd->chanlist[i]) % 2)) { comedi_error(dev, "bad chanlist:\n" " even/odd channels must go have even/odd chanlist indices"); @@ -337,7 +337,7 @@ static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice devpriv->control_state &= ~INTE & ~PACER_MASK; outb(devpriv->control_state, dev->iobase + DAS16M1_INTR_CONTROL); - // set software count + /* set software count */ devpriv->adc_count = 0; /* Initialize lower half of hardware counter, used to determine how * many samples are in fifo. Value doesn't actually load into counter @@ -361,7 +361,7 @@ static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice das16m1_set_pacer(dev, cmd->convert_arg, cmd->flags & TRIG_ROUND_MASK); - // set control & status register + /* set control & status register */ byte = 0; /* if we are using external start trigger (also board dislikes having * both start and conversion triggers external simultaneously) */ @@ -447,12 +447,12 @@ static int das16m1_do_wbits(struct comedi_device * dev, struct comedi_subdevice { unsigned int wbits; - // only set bits that have been masked + /* only set bits that have been masked */ data[0] &= 0xf; wbits = devpriv->do_bits; - // zero bits that have been masked + /* zero bits that have been masked */ wbits &= ~data[0]; - // set masked bits + /* set masked bits */ wbits |= data[0] & data[1]; devpriv->do_bits = wbits; data[1] = wbits; @@ -467,7 +467,7 @@ static int das16m1_poll(struct comedi_device * dev, struct comedi_subdevice * s) unsigned long flags; unsigned int status; - // prevent race with interrupt handler + /* prevent race with interrupt handler */ comedi_spin_lock_irqsave(&dev->spinlock, flags); status = inb(dev->iobase + DAS16M1_CS); das16m1_handler(dev, status); @@ -485,7 +485,7 @@ static irqreturn_t das16m1_interrupt(int irq, void *d) comedi_error(dev, "premature interrupt"); return IRQ_HANDLED; } - // prevent race with comedi_poll() + /* prevent race with comedi_poll() */ spin_lock(&dev->spinlock); status = inb(dev->iobase + DAS16M1_CS); @@ -527,7 +527,7 @@ static void das16m1_handler(struct comedi_device * dev, unsigned int status) async->events = 0; cmd = &async->cmd; - // figure out how many samples are in fifo + /* figure out how many samples are in fifo */ hw_counter = i8254_read(dev->iobase + DAS16M1_8254_FIRST, 0, 1); /* make sure hardware counter reading is not bogus due to initial value * not having been loaded yet */ @@ -542,12 +542,12 @@ static void das16m1_handler(struct comedi_device * dev, unsigned int status) * hardware counter. Work it out, and this is what you get. */ num_samples = -hw_counter - devpriv->adc_count; } - // check if we only need some of the points + /* check if we only need some of the points */ if (cmd->stop_src == TRIG_COUNT) { if (num_samples > cmd->stop_arg * cmd->chanlist_len) num_samples = cmd->stop_arg * cmd->chanlist_len; } - // make sure we dont try to get too many points if fifo has overrun + /* make sure we dont try to get too many points if fifo has overrun */ if (num_samples > FIFO_SIZE) num_samples = FIFO_SIZE; insw(dev->iobase, devpriv->ai_buffer, num_samples); @@ -669,7 +669,7 @@ static int das16m1_attach(struct comedi_device * dev, struct comedi_devconfig * /* now for the irq */ irq = it->options[1]; - // make sure it is valid + /* make sure it is valid */ if (das16m1_irq_bits(irq) >= 0) { ret = comedi_request_irq(irq, das16m1_interrupt, 0, driver_das16m1.driver_name, dev); @@ -728,10 +728,10 @@ static int das16m1_attach(struct comedi_device * dev, struct comedi_devconfig * /* 8255 */ subdev_8255_init(dev, s, NULL, dev->iobase + DAS16M1_82C55); - // disable upper half of hardware conversion counter so it doesn't mess with us + /* disable upper half of hardware conversion counter so it doesn't mess with us */ outb(TOTAL_CLEAR, dev->iobase + DAS16M1_8254_FIRST_CNTRL); - // initialize digital output lines + /* initialize digital output lines */ outb(devpriv->do_bits, dev->iobase + DAS16M1_DIO); /* set the interrupt level */ @@ -748,7 +748,7 @@ static int das16m1_detach(struct comedi_device * dev) { printk("comedi%d: das16m1: remove\n", dev->minor); -// das16m1_reset(dev); +/* das16m1_reset(dev); */ if (dev->subdevices) subdev_8255_cleanup(dev, dev->subdevices + 3); |