Staging: comedi: pcl726: fix coding style issues
Signed-off-by: Kevyn-Alexandre Paré <kevyn.alexandre.pare@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
dc8af06898
commit
a69fba9e37
@@ -127,7 +127,8 @@ struct pcl726_board {
|
|||||||
int di_lo;
|
int di_lo;
|
||||||
int do_hi;
|
int do_hi;
|
||||||
int do_lo;
|
int do_lo;
|
||||||
const struct comedi_lrange *const *range_type_list; /* list of supported ranges */
|
const struct comedi_lrange *const *range_type_list;
|
||||||
|
/* list of supported ranges */
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct pcl726_board boardtypes[] = {
|
static const struct pcl726_board boardtypes[] = {
|
||||||
@@ -204,9 +205,8 @@ static int pcl726_ao_insn_read(struct comedi_device *dev,
|
|||||||
int chan = CR_CHAN(insn->chanspec);
|
int chan = CR_CHAN(insn->chanspec);
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
for (n = 0; n < insn->n; n++) {
|
for (n = 0; n < insn->n; n++)
|
||||||
data[n] = devpriv->ao_readback[chan];
|
data[n] = devpriv->ao_readback[chan];
|
||||||
}
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,10 +256,10 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
|||||||
|
|
||||||
iobase = it->options[0];
|
iobase = it->options[0];
|
||||||
iorange = this_board->io_range;
|
iorange = this_board->io_range;
|
||||||
printk("comedi%d: pcl726: board=%s, 0x%03lx ", dev->minor,
|
printk(KERN_WARNING "comedi%d: pcl726: board=%s, 0x%03lx ", dev->minor,
|
||||||
this_board->name, iobase);
|
this_board->name, iobase);
|
||||||
if (!request_region(iobase, iorange, "pcl726")) {
|
if (!request_region(iobase, iorange, "pcl726")) {
|
||||||
printk("I/O port conflict\n");
|
printk(KERN_WARNING "I/O port conflict\n");
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,16 +283,16 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
|||||||
devpriv->first_chan = 2;
|
devpriv->first_chan = 2;
|
||||||
if (irq) { /* we want to use IRQ */
|
if (irq) { /* we want to use IRQ */
|
||||||
if (((1 << irq) & boardtypes[board].IRQbits) == 0) {
|
if (((1 << irq) & boardtypes[board].IRQbits) == 0) {
|
||||||
printk
|
printk(KERN_WARNING
|
||||||
(", IRQ %d is out of allowed range, DISABLING IT",
|
", IRQ %d is out of allowed range,"
|
||||||
irq);
|
" DISABLING IT", irq);
|
||||||
irq = 0; /* Bad IRQ */
|
irq = 0; /* Bad IRQ */
|
||||||
} else {
|
} else {
|
||||||
if (request_irq(irq, interrupt_pcl818, 0,
|
if (request_irq(irq, interrupt_pcl818, 0,
|
||||||
"pcl726", dev)) {
|
"pcl726", dev)) {
|
||||||
printk
|
printk(KERN_WARNING
|
||||||
(", unable to allocate IRQ %d, DISABLING IT",
|
", unable to allocate IRQ %d,"
|
||||||
irq);
|
" DISABLING IT", irq);
|
||||||
irq = 0; /* Can't use IRQ */
|
irq = 0; /* Can't use IRQ */
|
||||||
} else {
|
} else {
|
||||||
printk(", irq=%d", irq);
|
printk(", irq=%d", irq);
|
||||||
@@ -372,9 +372,8 @@ static int pcl726_detach(struct comedi_device *dev)
|
|||||||
/* printk("comedi%d: pcl726: remove\n",dev->minor); */
|
/* printk("comedi%d: pcl726: remove\n",dev->minor); */
|
||||||
|
|
||||||
#ifdef ACL6126_IRQ
|
#ifdef ACL6126_IRQ
|
||||||
if (dev->irq) {
|
if (dev->irq)
|
||||||
free_irq(dev->irq, dev);
|
free_irq(dev->irq, dev);
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dev->iobase)
|
if (dev->iobase)
|
||||||
|
Reference in New Issue
Block a user