diff options
author | Bill Pemberton <wfp5p@virginia.edu> | 2009-04-23 15:54:52 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-06-19 14:00:32 -0400 |
commit | 56e9e16619a0c14dc948cf88b3a7aaa70ac92b45 (patch) | |
tree | 4921515601d7d93ec861ec01229cb2f99bcd5e79 /drivers/staging/comedi | |
parent | 68c3dbff9fc9f25872408d0e95980d41733d48d0 (diff) |
Staging: comedi: more 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')
-rw-r--r-- | drivers/staging/comedi/drivers/addi-data/addi_eeprom.c | 14 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/adq12b.c | 14 | ||||
-rw-r--r-- | drivers/staging/comedi/drivers/ni_pcidio.c | 50 |
3 files changed, 39 insertions, 39 deletions
diff --git a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c index ccb35aee68b..8bb0f9a1abb 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_eeprom.c | |||
@@ -811,35 +811,35 @@ int i_EepromReadMainHeader(unsigned short w_PCIBoardEepromAddress, | |||
811 | struct str_MainHeader s_MainHeader; | 811 | struct str_MainHeader s_MainHeader; |
812 | struct str_DigitalInputHeader s_DigitalInputHeader; | 812 | struct str_DigitalInputHeader s_DigitalInputHeader; |
813 | struct str_DigitalOutputHeader s_DigitalOutputHeader; | 813 | struct str_DigitalOutputHeader s_DigitalOutputHeader; |
814 | //struct str_TimerMainHeader s_TimerMainHeader,s_WatchdogMainHeader; | 814 | /* struct str_TimerMainHeader s_TimerMainHeader,s_WatchdogMainHeader; */ |
815 | str_AnalogOutputHeader s_AnalogOutputHeader; | 815 | str_AnalogOutputHeader s_AnalogOutputHeader; |
816 | struct str_AnalogInputHeader s_AnalogInputHeader; | 816 | struct str_AnalogInputHeader s_AnalogInputHeader; |
817 | 817 | ||
818 | // Read size | 818 | /* Read size */ |
819 | s_MainHeader.w_HeaderSize = | 819 | s_MainHeader.w_HeaderSize = |
820 | w_EepromReadWord(w_PCIBoardEepromAddress, pc_PCIChipInformation, | 820 | w_EepromReadWord(w_PCIBoardEepromAddress, pc_PCIChipInformation, |
821 | 0x100 + 8); | 821 | 0x100 + 8); |
822 | 822 | ||
823 | // Read nbr of functionality | 823 | /* Read nbr of functionality */ |
824 | w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress, | 824 | w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress, |
825 | pc_PCIChipInformation, 0x100 + 10); | 825 | pc_PCIChipInformation, 0x100 + 10); |
826 | s_MainHeader.b_Nfunctions = (unsigned char) w_Temp & 0x00FF; | 826 | s_MainHeader.b_Nfunctions = (unsigned char) w_Temp & 0x00FF; |
827 | 827 | ||
828 | // Read functionality details | 828 | /* Read functionality details */ |
829 | for (i = 0; i < s_MainHeader.b_Nfunctions; i++) { | 829 | for (i = 0; i < s_MainHeader.b_Nfunctions; i++) { |
830 | // Read Type | 830 | /* Read Type */ |
831 | w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress, | 831 | w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress, |
832 | pc_PCIChipInformation, 0x100 + 12 + w_Count); | 832 | pc_PCIChipInformation, 0x100 + 12 + w_Count); |
833 | s_MainHeader.s_Functions[i].b_Type = (unsigned char) w_Temp & 0x3F; | 833 | s_MainHeader.s_Functions[i].b_Type = (unsigned char) w_Temp & 0x3F; |
834 | w_Count = w_Count + 2; | 834 | w_Count = w_Count + 2; |
835 | //Read Address | 835 | /* Read Address */ |
836 | s_MainHeader.s_Functions[i].w_Address = | 836 | s_MainHeader.s_Functions[i].w_Address = |
837 | w_EepromReadWord(w_PCIBoardEepromAddress, | 837 | w_EepromReadWord(w_PCIBoardEepromAddress, |
838 | pc_PCIChipInformation, 0x100 + 12 + w_Count); | 838 | pc_PCIChipInformation, 0x100 + 12 + w_Count); |
839 | w_Count = w_Count + 2; | 839 | w_Count = w_Count + 2; |
840 | } | 840 | } |
841 | 841 | ||
842 | // Display main header info | 842 | /* Display main header info */ |
843 | for (i = 0; i < s_MainHeader.b_Nfunctions; i++) { | 843 | for (i = 0; i < s_MainHeader.b_Nfunctions; i++) { |
844 | 844 | ||
845 | switch (s_MainHeader.s_Functions[i].b_Type) { | 845 | switch (s_MainHeader.s_Functions[i].b_Type) { |
diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index 9921702bf39..54724653a79 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c | |||
@@ -81,7 +81,7 @@ If you do not specify any options, they will default to | |||
81 | 81 | ||
82 | #include "../comedidev.h" | 82 | #include "../comedidev.h" |
83 | 83 | ||
84 | // address scheme (page 2.17 of the manual) | 84 | /* address scheme (page 2.17 of the manual) */ |
85 | #define ADQ12B_SIZE 16 | 85 | #define ADQ12B_SIZE 16 |
86 | 86 | ||
87 | #define ADQ12B_CTREG 0x00 | 87 | #define ADQ12B_CTREG 0x00 |
@@ -94,12 +94,12 @@ If you do not specify any options, they will default to | |||
94 | #define ADQ12B_CONT2 0x0e | 94 | #define ADQ12B_CONT2 0x0e |
95 | #define ADQ12B_COWORD 0x0f | 95 | #define ADQ12B_COWORD 0x0f |
96 | 96 | ||
97 | // mask of the bit at STINR to check end of conversion | 97 | /* mask of the bit at STINR to check end of conversion */ |
98 | #define ADQ12B_EOC 0x20 | 98 | #define ADQ12B_EOC 0x20 |
99 | 99 | ||
100 | #define TIMEOUT 20 | 100 | #define TIMEOUT 20 |
101 | 101 | ||
102 | // available ranges through the PGA gains | 102 | /* available ranges through the PGA gains */ |
103 | static const struct comedi_lrange range_adq12b_ai_bipolar = { 4, { | 103 | static const struct comedi_lrange range_adq12b_ai_bipolar = { 4, { |
104 | BIP_RANGE(5), | 104 | BIP_RANGE(5), |
105 | BIP_RANGE(2), | 105 | BIP_RANGE(2), |
@@ -134,7 +134,7 @@ static const struct adq12b_board adq12b_boards[] = { | |||
134 | .di_chans = 5, | 134 | .di_chans = 5, |
135 | .do_chans = 8 | 135 | .do_chans = 8 |
136 | } | 136 | } |
137 | // potentially, more adq-based deviced will be added | 137 | /* potentially, more adq-based deviced will be added */ |
138 | /*, | 138 | /*, |
139 | .name = "adq12b", | 139 | .name = "adq12b", |
140 | .ai_chans = 16, // this is just for reference, hardcoded again later | 140 | .ai_chans = 16, // this is just for reference, hardcoded again later |
@@ -337,17 +337,17 @@ static int adq12b_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s | |||
337 | /* wait for end of convertion */ | 337 | /* wait for end of convertion */ |
338 | i = 0; | 338 | i = 0; |
339 | do { | 339 | do { |
340 | // comedi_udelay(1); | 340 | /* comedi_udelay(1); */ |
341 | status = inb(dev->iobase + ADQ12B_STINR); | 341 | status = inb(dev->iobase + ADQ12B_STINR); |
342 | status = status & ADQ12B_EOC; | 342 | status = status & ADQ12B_EOC; |
343 | } while (status == 0 && ++i < TIMEOUT); | 343 | } while (status == 0 && ++i < TIMEOUT); |
344 | // } while (++i < 10); | 344 | /* } while (++i < 10); */ |
345 | 345 | ||
346 | /* read data */ | 346 | /* read data */ |
347 | hi = inb(dev->iobase + ADQ12B_ADHIG); | 347 | hi = inb(dev->iobase + ADQ12B_ADHIG); |
348 | lo = inb(dev->iobase + ADQ12B_ADLOW); | 348 | lo = inb(dev->iobase + ADQ12B_ADLOW); |
349 | 349 | ||
350 | //rt_printk("debug: chan=%d range=%d status=%d hi=%d lo=%d\n", channel, range, status, hi, lo); | 350 | /* rt_printk("debug: chan=%d range=%d status=%d hi=%d lo=%d\n", channel, range, status, hi, lo); */ |
351 | data[n] = (hi << 8) | lo; | 351 | data[n] = (hi << 8) | lo; |
352 | 352 | ||
353 | } | 353 | } |
diff --git a/drivers/staging/comedi/drivers/ni_pcidio.c b/drivers/staging/comedi/drivers/ni_pcidio.c index 773ba0e07f8..1d262c132d0 100644 --- a/drivers/staging/comedi/drivers/ni_pcidio.c +++ b/drivers/staging/comedi/drivers/ni_pcidio.c | |||
@@ -66,8 +66,8 @@ comedi_nonfree_firmware tarball available from http://www.comedi.org | |||
66 | */ | 66 | */ |
67 | 67 | ||
68 | #define USE_DMA | 68 | #define USE_DMA |
69 | //#define DEBUG 1 | 69 | /* #define DEBUG 1 */ |
70 | //#define DEBUG_FLAGS | 70 | /* #define DEBUG_FLAGS */ |
71 | 71 | ||
72 | #include "../comedidev.h" | 72 | #include "../comedidev.h" |
73 | 73 | ||
@@ -117,9 +117,9 @@ comedi_nonfree_firmware tarball available from http://www.comedi.org | |||
117 | #define Waited (1<<5) | 117 | #define Waited (1<<5) |
118 | #define PrimaryTC (1<<6) | 118 | #define PrimaryTC (1<<6) |
119 | #define SecondaryTC (1<<7) | 119 | #define SecondaryTC (1<<7) |
120 | //#define SerialRose | 120 | /* #define SerialRose */ |
121 | //#define ReqRose | 121 | /* #define ReqRose */ |
122 | //#define Paused | 122 | /* #define Paused */ |
123 | 123 | ||
124 | #define Group_1_First_Clear 6 /* W */ | 124 | #define Group_1_First_Clear 6 /* W */ |
125 | #define Group_2_First_Clear 7 /* W */ | 125 | #define Group_2_First_Clear 7 /* W */ |
@@ -206,7 +206,7 @@ comedi_nonfree_firmware tarball available from http://www.comedi.org | |||
206 | 206 | ||
207 | #define DMA_Line_Control_Group1 76 | 207 | #define DMA_Line_Control_Group1 76 |
208 | #define DMA_Line_Control_Group2 108 | 208 | #define DMA_Line_Control_Group2 108 |
209 | // channel zero is none | 209 | /* channel zero is none */ |
210 | static inline unsigned primary_DMAChannel_bits(unsigned channel) | 210 | static inline unsigned primary_DMAChannel_bits(unsigned channel) |
211 | { | 211 | { |
212 | return channel & 0x3; | 212 | return channel & 0x3; |
@@ -486,7 +486,7 @@ static irqreturn_t nidio_interrupt(int irq, void *d) | |||
486 | struct comedi_async *async = s->async; | 486 | struct comedi_async *async = s->async; |
487 | struct mite_struct *mite = devpriv->mite; | 487 | struct mite_struct *mite = devpriv->mite; |
488 | 488 | ||
489 | //int i, j; | 489 | /* int i, j; */ |
490 | long int AuxData = 0; | 490 | long int AuxData = 0; |
491 | short data1 = 0; | 491 | short data1 = 0; |
492 | short data2 = 0; | 492 | short data2 = 0; |
@@ -496,9 +496,9 @@ static irqreturn_t nidio_interrupt(int irq, void *d) | |||
496 | unsigned int m_status = 0; | 496 | unsigned int m_status = 0; |
497 | unsigned long irq_flags; | 497 | unsigned long irq_flags; |
498 | 498 | ||
499 | //interrupcions parasites | 499 | /* interrupcions parasites */ |
500 | if (dev->attached == 0) { | 500 | if (dev->attached == 0) { |
501 | // assume it's from another card | 501 | /* assume it's from another card */ |
502 | return IRQ_NONE; | 502 | return IRQ_NONE; |
503 | } | 503 | } |
504 | 504 | ||
@@ -511,8 +511,8 @@ static irqreturn_t nidio_interrupt(int irq, void *d) | |||
511 | ni_pcidio_print_flags(flags); | 511 | ni_pcidio_print_flags(flags); |
512 | ni_pcidio_print_status(status); | 512 | ni_pcidio_print_status(status); |
513 | 513 | ||
514 | //printk("buf[0]=%08x\n",*(unsigned int *)async->prealloc_buf); | 514 | /* printk("buf[0]=%08x\n",*(unsigned int *)async->prealloc_buf); */ |
515 | //printk("buf[4096]=%08x\n",*(unsigned int *)(async->prealloc_buf+4096)); | 515 | /* printk("buf[4096]=%08x\n",*(unsigned int *)(async->prealloc_buf+4096)); */ |
516 | 516 | ||
517 | comedi_spin_lock_irqsave(&devpriv->mite_channel_lock, irq_flags); | 517 | comedi_spin_lock_irqsave(&devpriv->mite_channel_lock, irq_flags); |
518 | if (devpriv->di_mite_chan) | 518 | if (devpriv->di_mite_chan) |
@@ -520,8 +520,8 @@ static irqreturn_t nidio_interrupt(int irq, void *d) | |||
520 | #ifdef MITE_DEBUG | 520 | #ifdef MITE_DEBUG |
521 | mite_print_chsr(m_status); | 521 | mite_print_chsr(m_status); |
522 | #endif | 522 | #endif |
523 | //printk("mite_bytes_transferred: %d\n",mite_bytes_transferred(mite,DI_DMA_CHAN)); | 523 | /* printk("mite_bytes_transferred: %d\n",mite_bytes_transferred(mite,DI_DMA_CHAN)); */ |
524 | //mite_dump_regs(mite); | 524 | /* mite_dump_regs(mite); */ |
525 | if (m_status & CHSR_INT) { | 525 | if (m_status & CHSR_INT) { |
526 | if (m_status & CHSR_LINKC) { | 526 | if (m_status & CHSR_LINKC) { |
527 | writel(CHOR_CLRLC, | 527 | writel(CHOR_CLRLC, |
@@ -552,7 +552,7 @@ static irqreturn_t nidio_interrupt(int irq, void *d) | |||
552 | flags &= IntEn; | 552 | flags &= IntEn; |
553 | 553 | ||
554 | if (flags & TransferReady) { | 554 | if (flags & TransferReady) { |
555 | //DPRINTK("TransferReady\n"); | 555 | /* DPRINTK("TransferReady\n"); */ |
556 | while (flags & TransferReady) { | 556 | while (flags & TransferReady) { |
557 | work++; | 557 | work++; |
558 | if (work > 100) { | 558 | if (work > 100) { |
@@ -569,14 +569,14 @@ static irqreturn_t nidio_interrupt(int irq, void *d) | |||
569 | data2 = (AuxData & 0xffff0000) >> 16; | 569 | data2 = (AuxData & 0xffff0000) >> 16; |
570 | comedi_buf_put(async, data1); | 570 | comedi_buf_put(async, data1); |
571 | comedi_buf_put(async, data2); | 571 | comedi_buf_put(async, data2); |
572 | //DPRINTK("read:%d, %d\n",data1,data2); | 572 | /* DPRINTK("read:%d, %d\n",data1,data2); */ |
573 | flags = readb(devpriv->mite->daq_io_addr + | 573 | flags = readb(devpriv->mite->daq_io_addr + |
574 | Group_1_Flags); | 574 | Group_1_Flags); |
575 | } | 575 | } |
576 | //DPRINTK("buf_int_count: %d\n",async->buf_int_count); | 576 | /* DPRINTK("buf_int_count: %d\n",async->buf_int_count); */ |
577 | //DPRINTK("1) IntEn=%d,flags=%d,status=%d\n",IntEn,flags,status); | 577 | /* DPRINTK("1) IntEn=%d,flags=%d,status=%d\n",IntEn,flags,status); */ |
578 | //ni_pcidio_print_flags(flags); | 578 | /* ni_pcidio_print_flags(flags); */ |
579 | //ni_pcidio_print_status(status); | 579 | /* ni_pcidio_print_status(status); */ |
580 | async->events |= COMEDI_CB_BLOCK; | 580 | async->events |= COMEDI_CB_BLOCK; |
581 | } | 581 | } |
582 | 582 | ||
@@ -621,10 +621,10 @@ static irqreturn_t nidio_interrupt(int irq, void *d) | |||
621 | flags = readb(devpriv->mite->daq_io_addr + Group_1_Flags); | 621 | flags = readb(devpriv->mite->daq_io_addr + Group_1_Flags); |
622 | status = readb(devpriv->mite->daq_io_addr + | 622 | status = readb(devpriv->mite->daq_io_addr + |
623 | Interrupt_And_Window_Status); | 623 | Interrupt_And_Window_Status); |
624 | //DPRINTK("loop end: IntEn=0x%02x,flags=0x%02x,status=0x%02x\n", | 624 | /* DPRINTK("loop end: IntEn=0x%02x,flags=0x%02x,status=0x%02x\n", */ |
625 | // IntEn,flags,status); | 625 | /* IntEn,flags,status); */ |
626 | //ni_pcidio_print_flags(flags); | 626 | /* ni_pcidio_print_flags(flags); */ |
627 | //ni_pcidio_print_status(status); | 627 | /* ni_pcidio_print_status(status); */ |
628 | } | 628 | } |
629 | 629 | ||
630 | out: | 630 | out: |
@@ -963,7 +963,7 @@ static int ni_pcidio_cmd(struct comedi_device * dev, struct comedi_subdevice * s | |||
963 | 963 | ||
964 | /* clear and enable interrupts */ | 964 | /* clear and enable interrupts */ |
965 | writeb(0xff, devpriv->mite->daq_io_addr + Group_1_First_Clear); | 965 | writeb(0xff, devpriv->mite->daq_io_addr + Group_1_First_Clear); |
966 | //writeb(ClearExpired,devpriv->mite->daq_io_addr+Group_1_Second_Clear); | 966 | /* writeb(ClearExpired,devpriv->mite->daq_io_addr+Group_1_Second_Clear); */ |
967 | 967 | ||
968 | writeb(IntEn, devpriv->mite->daq_io_addr + Interrupt_Control); | 968 | writeb(IntEn, devpriv->mite->daq_io_addr + Interrupt_Control); |
969 | writeb(0x03, | 969 | writeb(0x03, |
@@ -971,7 +971,7 @@ static int ni_pcidio_cmd(struct comedi_device * dev, struct comedi_subdevice * s | |||
971 | 971 | ||
972 | if (cmd->stop_src == TRIG_NONE) { | 972 | if (cmd->stop_src == TRIG_NONE) { |
973 | devpriv->OpModeBits = DataLatching(0) | RunMode(7); | 973 | devpriv->OpModeBits = DataLatching(0) | RunMode(7); |
974 | } else { // TRIG_TIMER | 974 | } else { /* TRIG_TIMER */ |
975 | devpriv->OpModeBits = Numbered | RunMode(7); | 975 | devpriv->OpModeBits = Numbered | RunMode(7); |
976 | } | 976 | } |
977 | if (cmd->start_src == TRIG_NOW) { | 977 | if (cmd->start_src == TRIG_NOW) { |