Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281104
b: refs/heads/master
c: bb1defe
h: refs/heads/master
v: v3
  • Loading branch information
Ravishankar karkala Mallikarjunayya authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent 73b0df8 commit 2b47a41
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 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: 5d2d50745cff532617a7e44ac0201283535b17d5
refs/heads/master: bb1defe4653567f7754af741e20a79796a81beaa
19 changes: 10 additions & 9 deletions trunk/drivers/staging/comedi/drivers/das800.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,42 +466,43 @@ static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long irq_flags;
int board;

printk("comedi%d: das800: io 0x%lx", dev->minor, iobase);
dev_info(dev->hw_dev, "comedi%d: das800: io 0x%lx\n", dev->minor,
iobase);
if (irq)
printk(", irq %u", irq);
printk("\n");
dev_dbg(dev->hw_dev, "irq %u\n", irq);

/* allocate and initialize dev->private */
if (alloc_private(dev, sizeof(struct das800_private)) < 0)
return -ENOMEM;

if (iobase == 0) {
printk("io base address required for das800\n");
dev_err(dev->hw_dev, "io base address required for das800\n");
return -EINVAL;
}

/* check if io addresses are available */
if (!request_region(iobase, DAS800_SIZE, "das800")) {
printk("I/O port conflict\n");
dev_err(dev->hw_dev, "I/O port conflict\n");
return -EIO;
}
dev->iobase = iobase;

board = das800_probe(dev);
if (board < 0) {
printk("unable to determine board type\n");
dev_dbg(dev->hw_dev, "unable to determine board type\n");
return -ENODEV;
}
dev->board_ptr = das800_boards + board;

/* grab our IRQ */
if (irq == 1 || irq > 7) {
printk("irq out of range\n");
dev_err(dev->hw_dev, "irq out of range\n");
return -EINVAL;
}
if (irq) {
if (request_irq(irq, das800_interrupt, 0, "das800", dev)) {
printk("unable to allocate irq %u\n", irq);
dev_err(dev->hw_dev, "unable to allocate irq %u\n",
irq);
return -EINVAL;
}
}
Expand Down Expand Up @@ -557,7 +558,7 @@ static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it)

static int das800_detach(struct comedi_device *dev)
{
printk("comedi%d: das800: remove\n", dev->minor);
dev_info(dev->hw_dev, "comedi%d: das800: remove\n", dev->minor);

/* only free stuff if it has been allocated by _attach */
if (dev->iobase)
Expand Down

0 comments on commit 2b47a41

Please sign in to comment.