aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
AgeCommit message (Collapse)Author
2010-03-03Staging: comedi: das6402.c: Checkpatch cleanupAndrea Gelmini
ERROR: Macros with complex values should be enclosed in parenthesis +#define N_WORDS 3000*64 Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: hwdrv_apci3120.c: Checkpatch cleanupAndrea Gelmini
ERROR: do not initialise statics to 0 or NULL +static unsigned int ui_Temp = 0; WARNING: braces {} are not necessary for any arm of this statement + if (data[1]) { [...] + } else [...] WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) { + devpriv->ui_AiChannelList[i] = data[4 + i]; + } ERROR: that open brace { should be on the previous line + } else /* EOC */ + { WARNING: braces {} are not necessary for any arm of this statement + if (data[1]) { [...] + } else { [...] ERROR: that open brace { should be on the previous line + if (insn->unused[0] == 222) /* second insn read */ + { WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < insn->n; i++) { + data[i] = devpriv->ui_AiReadData[i]; + } WARNING: braces {} are not necessary for single statement blocks + if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT) { + err++; + } ERROR: that open brace { should be on the previous line + if (cmd->scan_begin_src == TRIG_TIMER) /* Test Delay timing */ + { ERROR: that open brace { should be on the previous line + if (cmd->convert_src == TRIG_TIMER) /* Test Acquisition timing */ + { WARNING: braces {} are not necessary for any arm of this statement + if (cmd->stop_src == TRIG_COUNT) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (devpriv->b_ExttrigEnable == APCI3120_ENABLE) { + i_APCI3120_ExttrigEnable(dev); /* activate EXT trigger */ + } WARNING: braces {} are not necessary for single statement blocks + if (dmalen0 > (devpriv->ui_AiDataLength)) { + dmalen0 = devpriv->ui_AiDataLength; + } WARNING: braces {} are not necessary for single statement blocks + if (dmalen1 > (devpriv->ui_AiDataLength)) { + dmalen1 = devpriv->ui_AiDataLength; + } WARNING: braces {} are not necessary for any arm of this statement + if (CR_RANGE(chanlist[i]) < APCI3120_BIPOLAR_RANGES) { [...] + } else { [...] ERROR: that open brace { should be on the previous line + if (devpriv->b_EocEosInterrupt == APCI3120_ENABLE) /* enable this in without DMA ??? */ + { ERROR: that open brace { should be on the previous line + if (data[0] == APCI3120_TIMER) /* initialize timer */ + { ERROR: that open brace { should be on the previous line + } else /* Initialize Watch dog */ + { ERROR: that open brace { should be on the previous line + if (data[0] == 2) /* write new value */ + { ERROR: that open brace { should be on the previous line + if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */ + { ERROR: that open brace { should be on the previous line + } else /* start watch dog */ + { ERROR: that open brace { should be on the previous line + if (devpriv->b_Timer2Mode == APCI3120_TIMER) /* start timer */ + { ERROR: that open brace { should be on the previous line + } else /* Read watch dog status */ + { WARNING: braces {} are not necessary for single statement blocks + if (!devpriv->b_OutputMemoryStatus) { + ui_Temp = 0; + + } /* if(!devpriv->b_OutputMemoryStatus ) */ ERROR: code indent should use tabs where possible + data[0] Value to be written$ ERROR: code indent should use tabs where possible + data[1] :1 Set digital o/p ON$ ERROR: code indent should use tabs where possible + data[1] 2 Set digital o/p OFF with memory ON$ ERROR: that open brace { should be on the previous line + if (ui_Range) /* if 1 then unipolar */ + { ERROR: that open brace { should be on the previous line + } else /* if 0 then bipolar */ + { ERROR: that open brace { should be on the previous line + do /* Waiting of DA_READY BIT */ + { Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: das08_cs.c: Checkpatch cleanupAndrea Gelmini
ERROR: code indent should use tabs where possible + NONE$ ERROR: do not initialise statics to 0 or NULL +static struct pcmcia_device *cur_dev = NULL; Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: contec_pci_dio.c: Checkpatch cleanupAndrea Gelmini
WARNING: braces {} are not necessary for single statement blocks + if (dev->iobase) { + comedi_pci_disable(devpriv->pci_dev); + } Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: cb_pcimdda.c: Checkpatch cleanupAndrea Gelmini
WARNING: braces {} are not necessary for any arm of this statement + if (it->options[2]) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (devpriv->registers) { + comedi_pci_disable(devpriv->pci_dev); + } Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: cb_pcimdas.c: Checkpatch cleanupAndrea Gelmini
WARNING: braces {} are not necessary for any arm of this statement + if (thisboard->has_dio) { [...] + } else { [...] WARNING: braces {} are not necessary for single statement blocks + if (devpriv->BADR0) { + comedi_pci_disable(devpriv->pci_dev); + } Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: cb_pcidio.c: Checkpatch cleanupAndrea Gelmini
WARNING: braces {} are not necessary for single statement blocks + if (devpriv->dio_reg_base) { + comedi_pci_disable(devpriv->pci_dev); + } WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < thisboard->n_8255; i++) { + subdev_8255_cleanup(dev, dev->subdevices + i); + } Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: cb_pcidda.c: Checkpatch cleanupAndrea Gelmini
WARNING: braces {} are not necessary for single statement blocks + if (devpriv->dac) { + comedi_pci_disable(devpriv->pci_dev); + } WARNING: braces {} are not necessary for single statement blocks + if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) { + value |= 1 << (value_width - i); + } WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < max_num_caldacs; i++) { + cal2_bits |= DESELECT_CALDAC_BIT(i); + } WARNING: braces {} are not necessary for single statement blocks + for (i = 0; i < max_num_caldacs; i++) { + cal2_bits |= DESELECT_CALDAC_BIT(i); + } Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: cb_pcidas.c: Checkpatch cleanupAndrea Gelmini
ERROR: "foo * bar" should be "foo *bar" + uint8_t * data); WARNING: braces {} are not necessary for single statement blocks + if (devpriv->s5933_config) { + comedi_pci_disable(devpriv->pci_dev); + } WARNING: braces {} are not necessary for single statement blocks + if (cmd->stop_src == TRIG_COUNT) { + devpriv->count = cmd->chanlist_len * cmd->stop_arg; + } WARNING: braces {} are not necessary for single statement blocks + if (cmd->stop_src == TRIG_COUNT) { + devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg; + } WARNING: braces {} are not necessary for single statement blocks + if (cmd->stop_src == TRIG_COUNT) { + devpriv->ao_count -= num_points; + } WARNING: braces {} are not necessary for single statement blocks + if (dev->attached == 0) { + return IRQ_NONE; + } WARNING: braces {} are not necessary for single statement blocks + if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) { + comedi_error(dev, "spurious interrupt"); + } WARNING: braces {} are not necessary for single statement blocks + if (status & (DAHFI | DAEMI)) { + handle_ao_interrupt(dev, status); + } WARNING: braces {} are not necessary for single statement blocks + if (async->cmd.stop_src == TRIG_COUNT) { + devpriv->ao_count -= num_points; + } ERROR: "foo * bar" should be "foo *bar" + uint8_t * data) Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: hwdrv_apci1032.c: Checkpatch cleanupAndrea Gelmini
ERROR: do not initialise externals to 0 or NULL +unsigned int ui_InterruptStatus = 0; WARNING: braces {} are not necessary for single statement blocks + else { + outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ); + } /* else if(data[1] == ADDIDATA_OR) */ WARNING: braces {} are not necessary for single statement blocks + if (data[1] == 1) { + *data = ui_InterruptStatus; + } /* if(data[1]==1) */ Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: addi_common.h: Checkpatch cleanupAndrea Gelmini
ERROR: code indent should use tabs where possible + const struct comedi_lrange *pr_AiRangelist;^I/* rangelist for A/D */$ ERROR: code indent should use tabs where possible + const struct comedi_lrange *pr_AoRangelist;^I/* rangelist for D/A */$ Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: addi_amcc_S5920.c: Checkpatch cleanupAndrea Gelmini
WARNING: braces {} are not necessary for any arm of this statement + if (i_Counter == 0) { [...] + } else { [...] Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: amplc_pci224.c: coding style cleanupsd binderman
Signed-off-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: Cleanup useless headersAlessio Igor Bogani
BKL isn't anymore present into these files thus it is no necessary still include smp_lock.h. Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: Increased timeout for digital output dma loadingFrank Mori Hess
Increased timeout for digital output dma loading, due to report of it being too short for some hardware. Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: serial2002: Fix filp_open usageOGAWA Hirofumi
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: amplc_pc236: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the amplc_pc236 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: amplc_dio200: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the amplc_dio200 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: aio_iiro_16: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the aio_iiro_16 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: fix coding style issues in ni_labpc.cStewart Robertson
This is a patch to the ni_labpc.c file that fixes the brace warnings and comments over 80 characters found by the checkpatch.pl tool. Some code still goes over 80 characters because I didn't know what to do with it. Signed-off-by: Stewart Robertson <stewart_r@aliencamel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: fix brace and 80 character coding style issue in ni_daq_700.cGraham M Howe
This is a patch to the ni_daq_700.c file that fixes up brace and 80 character warnings found by the checkpatch.pl tool Signed-off-by: Graham M Howe <gman.1352@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: bracing fix to ni_atmio.cGraham M Howe
This is a patch to ni_atmio.c file to fix up bracing style problems found by checkpatch.pl tool Signed-off-by: Graham M Howe <gman.1352@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: rti800: more Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the rti800 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: ssc_dnp: fixed a brace coding style issueGreg Kroah-Hartman
Fixed a coding style issue. Created during the keynote presentation at FOSDEM 2010 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: ni_pcidio: Checkpatch cleanupsBenjamin Adolphi
This fixes almost all checkpatch issues in the ni_pcidio comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: rti802: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the rti802 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: dt2815: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the dt2815 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: fix brace coding style in comedi_fops.cPaul Elms
This patch to the comedi_fops.c file fixes a brace warning found by the checkpatch.pl tool Signed-off-by: Paul Elms <paul@uprocera.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: fix brace coding style issues in ni_labpc.ctony burrows
This patch fixes all of the brace style warnings found by the checkpatch.pl tool Signed-off-by: Tony Burrows <tony@tonyburrows.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: adq12b: Checkpatch cleanups 2Benjamin Adolphi
This fixes all checkpatch issues in the adq12b comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: fl512: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the fl512 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: ni_65xx: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the ni_65xx comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: ni_670x: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the ni_670x comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: ni_660x: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the ni_660x comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: poc: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the poc comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcm3730: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the pcm3730 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcm3724: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the pcm3724 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl818: Remove unneeded chanlist_len checkIan Abbott
For AI command testing, the driver does not need to range-check the length of the channel list as the comedi core has already checked it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl816: Check channel list in AI command testIan Abbott
Check the channel list is valid in step 5 of the AI command test. Split function check_and_setup_channel_list() in two. Also, remove unnecessary chanlist_len tests in step 3 of the AI command test as the comedi core has already checked it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl812: Update MUX for multi-channel AI commandIan Abbott
For multi-channel AI commands, the interrupt handler is missing code to switch to the next channel. Add some (untested) code to handle this. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: adv_pci1710: Remove unneeded chanlist_len checkIan Abbott
For AI command testing, the driver does not need to range-check the length of the channel list as the comedi core has already checked it. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: adv_pci1710: Correct AI scan count and channel checksIan Abbott
For AI commands, the internal channel list used to check incoming data was only set up partially if the channel list contained repeats. Set it up fully. Also the current scan position was not updated properly when moving a block of data from the FIFO unless a whole number of scans was moved. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl818: Correct AI scan counting and channel checksIan Abbott
For AI commands, the scan counter should be updated after every scan. It was being updated after every sample except for DMA mode where it was being updated after every repeated segment of the channel list. Also AI commands with multiple channels were being terminated with an error prematurely except in DMA mode. This was because the driver was comparing channel numbers received from the hardware (combined with the sample value) with the expected channel numbers to check for a "channel dropout". This test was failing incorrectly because the driver was not keeping the current position within the (repeated segment of the) channel list up to date. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl816: Correct AI scan countingIan Abbott
For AI commands, the scan counter should be updated after every scan. In DMA mode, it was being updated after every repeated segment of the channel list. In non-DMA mode, it was being updated after every sample. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl812: Correct AI scan countingIan Abbott
The AI scan counter should be updated after every completed scan, not after every channel. Keep track of current channel. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: Comedi: G1-3 status registers not read in ni_gpct_to_660x_register()Roel Kluin
Read from the right status register Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl730: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the pcl730 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl725: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the pcl725 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl724: Checkpatch cleanupsBenjamin Adolphi
This fixes all checkpatch issues in the pcl724 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03Staging: comedi: pcl711: Checkpatch cleanupsBenjamin Adolphi
This fixes some checkpatch issues in the pcl711 comedi driver. Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>