Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281097
b: refs/heads/master
c: be545c6
h: refs/heads/master
i:
  281095: 7bd7099
v: v3
  • Loading branch information
Ravishankar karkala Mallikarjunayya authored and Greg Kroah-Hartman committed Nov 27, 2011
1 parent bc461a5 commit befed92
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 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: 4547251f6a9cf6d2f4255b918668526417973315
refs/heads/master: be545c6251875797fdd9add35a48a1111e896d1e
32 changes: 12 additions & 20 deletions trunk/drivers/staging/comedi/drivers/adv_pci1710.c
Original file line number Diff line number Diff line change
Expand Up @@ -1382,16 +1382,14 @@ static int pci1710_attach(struct comedi_device *dev,
int i;
int board_index;

printk("comedi%d: adv_pci1710: ", dev->minor);
dev_info(dev->hw_dev, "comedi%d: adv_pci1710:\n", dev->minor);

opt_bus = it->options[0];
opt_slot = it->options[1];

ret = alloc_private(dev, sizeof(struct pci1710_private));
if (ret < 0) {
printk(" - Allocation failed!\n");
if (ret < 0)
return -ENOMEM;
}

/* Look for matching PCI device */
errstr = "not found!";
Expand Down Expand Up @@ -1436,10 +1434,10 @@ static int pci1710_attach(struct comedi_device *dev,

if (!pcidev) {
if (opt_bus || opt_slot) {
printk(" - Card at b:s %d:%d %s\n",
opt_bus, opt_slot, errstr);
dev_err(dev->hw_dev, "- Card at b:s %d:%d %s\n",
opt_bus, opt_slot, errstr);
} else {
printk(" - Card %s\n", errstr);
dev_err(dev->hw_dev, "- Card %s\n", errstr);
}
return -EIO;
}
Expand All @@ -1450,8 +1448,8 @@ static int pci1710_attach(struct comedi_device *dev,
irq = pcidev->irq;
iobase = pci_resource_start(pcidev, 2);

printk(", b:s:f=%d:%d:%d, io=0x%4lx", pci_bus, pci_slot, pci_func,
iobase);
dev_dbg(dev->hw_dev, "b:s:f=%d:%d:%d, io=0x%4lx\n", pci_bus, pci_slot,
pci_func, iobase);

dev->iobase = iobase;

Expand All @@ -1471,10 +1469,8 @@ static int pci1710_attach(struct comedi_device *dev,
n_subdevices++;

ret = alloc_subdevices(dev, n_subdevices);
if (ret < 0) {
printk(" - Allocation failed!\n");
if (ret < 0)
return ret;
}

pci1710_reset(dev);

Expand All @@ -1483,24 +1479,20 @@ static int pci1710_attach(struct comedi_device *dev,
if (request_irq(irq, interrupt_service_pci1710,
IRQF_SHARED, "Advantech PCI-1710",
dev)) {
printk
(", unable to allocate IRQ %d, DISABLING IT",
irq);
dev_dbg(dev->hw_dev, "unable to allocate IRQ %d, DISABLING IT",
irq);
irq = 0; /* Can't use IRQ */
} else {
printk(", irq=%u", irq);
dev_dbg(dev->hw_dev, "irq=%u", irq);
}
} else {
printk(", IRQ disabled");
dev_dbg(dev->hw_dev, "IRQ disabled");
}
} else {
irq = 0;
}

dev->irq = irq;

printk(".\n");

subdev = 0;

if (this_board->n_aichan) {
Expand Down

0 comments on commit befed92

Please sign in to comment.