Skip to content

Commit

Permalink
Staging: comedi: cb_pcimdda.c: Checkpatch cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andrea Gelmini authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 7c2f194 commit f1c54e8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions drivers/staging/comedi/drivers/cb_pcimdda.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,11 +284,10 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->n_chan = thisboard->ao_chans;
s->maxdata = figure_out_maxdata(thisboard->ao_bits);
/* this is hard-coded here */
if (it->options[2]) {
if (it->options[2])
s->range_table = &range_bipolar10;
} else {
else
s->range_table = &range_bipolar5;
}
s->insn_write = &ao_winsn;
s->insn_read = &ao_rinsn;

Expand Down Expand Up @@ -337,9 +336,8 @@ static int detach(struct comedi_device *dev)
}

if (devpriv->pci_dev) {
if (devpriv->registers) {
if (devpriv->registers)
comedi_pci_disable(devpriv->pci_dev);
}
pci_dev_put(devpriv->pci_dev);
}

Expand Down

0 comments on commit f1c54e8

Please sign in to comment.