Turns out that multiple people sent pretty much the same patch
for the same staging drivers. Commit these in two different
branches and merge them together to get a more complete coverage
of the cleanup and properly credit everyone for the work that they
did.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: do not initialise externals to 0 or NULL
+int comedi_num_legacy_minors = 0;
WARNING: braces {} are not necessary for single statement blocks
+ if (s->subdev_flags & SDF_CMD_READ) {
+ kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (s->subdev_flags & SDF_CMD_WRITE) {
+ kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes suspect code indent for
conditional statements found by the checkpatch.pl tool
Signed-off-by: Stewart Robertson <stewart_r@aliencamel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes up all the brace
warnings found by the checkpatch.pl tool
Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes up a brace warning
found by the checkpatch.pl tool
Signed-off-by: Maurice Dawson <mauricedawson2699@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_labpc.c file that fixes up a brace warning
found by the checkpatch.pl tool.
Signed-off-by: Maurice Dawson <maurice2699@btinternet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes some coding style issues like include KERN_ facility levels
in some printk() and one trailing whitespace error.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_660x.c file that fixes up the brace and 80
character issues found by the checkpatch tool
Signed-off-by: Graham M Howe <gmhowe@btopenworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This is a patch to the ni_65xx.c file that fixes up a brace
warning found by the checkpatch.pl tool
Signed-off-by: Graham M Howe <gmhowe@btopenworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes all checkpatch issues in the pcmad comedi driver.
Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This fixes a line over 80 characters and a brace warnings.
Signed-off-by: Chihau Chau <chihau@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
+#include <asm/io.h>
WARNING: braces {} are not necessary for any arm of this statement
+ if (dev->driver) {
[...]
+ } else {
[...]
WARNING: braces {} are not necessary for single statement blocks
+ if (insn->insn == INSN_READ) {
+ data[0] = (new_data[1] >> (chan - base_bitfield_channel)) & 1;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->prealloc_buf && async->prealloc_bufsz == new_size) {
+ return 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->buf_page_list[i].virt_addr == NULL) {
+ break;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+ nbytes = free_end - async->buf_write_alloc_count;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if ((int)(async->buf_write_alloc_count + nbytes - free_end) > 0) {
+ nbytes = 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (async->buf_write_ptr >= async->prealloc_bufsz) {
+ async->buf_write_ptr %= async->prealloc_bufsz;
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
ERROR: code indent should use tabs where possible
+ 0 = [-10,10]$
ERROR: code indent should use tabs where possible
+ 0 = [-10,10]$
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & (DT_S_COMPOSITE_ERROR | DT_S_READY)) {
+ return stat;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_COMPOSITE_ERROR) {
+ return stat;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_READY) {
+ return 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_COMPOSITE_ERROR) {
+ return stat;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (stat & DT_S_READY) {
+ return 0;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (!(stat & DT_S_READY)) {
+ printk("dt2801: !ready in dt2801_writecmd(), ignoring\n");
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (!timeout) {
+ printk("dt2801: timeout 1 status=0x%02x\n", stat);
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (!timeout) {
+ printk("dt2801: timeout 2 status=0x%02x\n", stat);
+ }
WARNING: braces {} are not necessary for any arm of this statement
+ if (stat == -ETIME) {
[...]
+ } else {
[...]
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for any arm of this statement
+ if (data[0] == COMEDI_OUTPUT) {
[...]
+ } else {
[...]
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
WARNING: braces {} are not necessary for single statement blocks
+ if (fifo_empty) {
+ break;
+ }
WARNING: braces {} are not necessary for single statement blocks
+ if (irq) {
+ printk(", irq %u", irq);
+ }
Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>