Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175097
b: refs/heads/master
c: a69fba9
h: refs/heads/master
i:
  175095: 54bbb12
v: v3
  • Loading branch information
Kevyn-Alexandre Paré authored and Greg Kroah-Hartman committed Dec 11, 2009
1 parent 475c09b commit 34233f8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dc8af06898c4326cee1739e2bc100bed2b601721
refs/heads/master: a69fba9e379b67c7fb54012547200f4517447bbd
41 changes: 20 additions & 21 deletions trunk/drivers/staging/comedi/drivers/pcl726.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@ Interrupts are not supported.
Options for PCL-726:
[0] - IO Base
[2]...[7] - D/A output range for channel 1-6:
0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
4: 4-20mA, 5: unknown (external reference)
0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
4: 4-20mA, 5: unknown (external reference)
Options for PCL-727:
[0] - IO Base
[2]...[13] - D/A output range for channel 1-12:
0: 0-5V, 1: 0-10V, 2: +/-5V,
3: 4-20mA
0: 0-5V, 1: 0-10V, 2: +/-5V,
3: 4-20mA
Options for PCL-728 and ACL-6128:
[0] - IO Base
[2], [3] - D/A output range for channel 1 and 2:
0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
4: 4-20mA, 5: 0-20mA
0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
4: 4-20mA, 5: 0-20mA
Options for ACL-6126:
[0] - IO Base
[1] - IRQ (0=disable, 3, 5, 6, 7, 9, 10, 11, 12, 15) (currently ignored)
[2]...[7] - D/A output range for channel 1-6:
0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
4: 4-20mA
0: 0-5V, 1: 0-10V, 2: +/-5V, 3: +/-10V,
4: 4-20mA
*/

/*
Expand Down Expand Up @@ -127,7 +127,8 @@ struct pcl726_board {
int di_lo;
int do_hi;
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[] = {
Expand Down Expand Up @@ -204,9 +205,8 @@ static int pcl726_ao_insn_read(struct comedi_device *dev,
int chan = CR_CHAN(insn->chanspec);
int n;

for (n = 0; n < insn->n; n++) {
for (n = 0; n < insn->n; n++)
data[n] = devpriv->ao_readback[chan];
}
return n;
}

Expand Down Expand Up @@ -256,10 +256,10 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)

iobase = it->options[0];
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);
if (!request_region(iobase, iorange, "pcl726")) {
printk("I/O port conflict\n");
printk(KERN_WARNING "I/O port conflict\n");
return -EIO;
}

Expand All @@ -283,16 +283,16 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
devpriv->first_chan = 2;
if (irq) { /* we want to use IRQ */
if (((1 << irq) & boardtypes[board].IRQbits) == 0) {
printk
(", IRQ %d is out of allowed range, DISABLING IT",
irq);
printk(KERN_WARNING
", IRQ %d is out of allowed range,"
" DISABLING IT", irq);
irq = 0; /* Bad IRQ */
} else {
if (request_irq(irq, interrupt_pcl818, 0,
"pcl726", dev)) {
printk
(", unable to allocate IRQ %d, DISABLING IT",
irq);
printk(KERN_WARNING
", unable to allocate IRQ %d,"
" DISABLING IT", irq);
irq = 0; /* Can't use IRQ */
} else {
printk(", irq=%d", irq);
Expand Down Expand Up @@ -372,9 +372,8 @@ static int pcl726_detach(struct comedi_device *dev)
/* printk("comedi%d: pcl726: remove\n",dev->minor); */

#ifdef ACL6126_IRQ
if (dev->irq) {
if (dev->irq)
free_irq(dev->irq, dev);
}
#endif

if (dev->iobase)
Expand Down

0 comments on commit 34233f8

Please sign in to comment.