Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317158
b: refs/heads/master
c: 4b05d17
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent 804671b commit 2628f46
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 29 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: 9dc5a822ea8eaa2397f95aace504fcc657a6cd8b
refs/heads/master: 4b05d17d8dcea60ccb1c39aaec60164dccdbc3e5
50 changes: 22 additions & 28 deletions trunk/drivers/staging/comedi/drivers/amplc_pci230.c
Original file line number Diff line number Diff line change
Expand Up @@ -697,8 +697,8 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)
struct pci_dev *pci_dev = NULL;
int i = 0, irq_hdl, rc;

printk("comedi%d: amplc_pci230: attach %s %d,%d\n", dev->minor,
thisboard->name, it->options[0], it->options[1]);
dev_info(dev->class_dev, "amplc_pci230: attach %s %d,%d\n",
thisboard->name, it->options[0], it->options[1]);

/* Allocate the private structure area using alloc_private().
* Macro defined in comedidev.h - memsets struct fields to 0. */
Expand Down Expand Up @@ -772,8 +772,7 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)
}
}
if (!pci_dev) {
printk("comedi%d: No %s card found\n", dev->minor,
thisboard->name);
dev_err(dev->class_dev, "No %s card found\n", thisboard->name);
return -EIO;
}
devpriv->pci_dev = pci_dev;
Expand All @@ -785,8 +784,8 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)

/* Enable PCI device and reserve I/O spaces. */
if (comedi_pci_enable(pci_dev, "amplc_pci230") < 0) {
printk("comedi%d: failed to enable PCI device "
"and request regions\n", dev->minor);
dev_err(dev->class_dev,
"failed to enable PCI device and request regions\n");
return -EIO;
}

Expand All @@ -795,8 +794,9 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)
iobase1 = pci_resource_start(pci_dev, 2);
iobase2 = pci_resource_start(pci_dev, 3);

printk("comedi%d: %s I/O region 1 0x%04lx I/O region 2 0x%04lx\n",
dev->minor, dev->board_name, iobase1, iobase2);
dev_dbg(dev->class_dev,
"%s I/O region 1 0x%04lx I/O region 2 0x%04lx\n",
dev->board_name, iobase1, iobase2);

devpriv->iobase1 = iobase1;
dev->iobase = iobase2;
Expand All @@ -811,10 +811,10 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)

devpriv->hwver = inw(dev->iobase + PCI230P_HWVER);
if (devpriv->hwver < thisboard->min_hwver) {
printk("comedi%d: %s - bad hardware version "
"- got %u, need %u\n", dev->minor,
dev->board_name, devpriv->hwver,
thisboard->min_hwver);
dev_err(dev->class_dev,
"%s - bad hardware version - got %u, need %u\n",
dev->board_name, devpriv->hwver,
thisboard->min_hwver);
return -EIO;
}
if (devpriv->hwver > 0) {
Expand Down Expand Up @@ -862,13 +862,13 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)
irq_hdl = request_irq(devpriv->pci_dev->irq, pci230_interrupt,
IRQF_SHARED, "amplc_pci230", dev);
if (irq_hdl < 0) {
printk("comedi%d: unable to register irq, "
"commands will not be available %d\n", dev->minor,
devpriv->pci_dev->irq);
dev_warn(dev->class_dev,
"unable to register irq %u, commands will not be available\n",
devpriv->pci_dev->irq);
} else {
dev->irq = devpriv->pci_dev->irq;
printk("comedi%d: registered irq %u\n", dev->minor,
devpriv->pci_dev->irq);
dev_dbg(dev->class_dev, "registered irq %u\n",
devpriv->pci_dev->irq);
}

/*
Expand Down Expand Up @@ -931,7 +931,7 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s->type = COMEDI_SUBD_UNUSED;
}

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

return 1;
}
Expand Down Expand Up @@ -1117,9 +1117,7 @@ static int pci230_ai_rinsn(struct comedi_device *dev,
udelay(1);
}
if (i == TIMEOUT) {
/* printk() should be used instead of printk()
* whenever the code can be called from real-time. */
printk("timeout\n");
dev_err(dev->class_dev, "timeout\n");
return -ETIMEDOUT;
}

Expand Down Expand Up @@ -1992,13 +1990,9 @@ static int pci230_ai_cmdtest(struct comedi_device *dev,
(s->n_chan / 2) - 1);
}
if ((errors & buggy_chan0_err) != 0) {
/* Use printk instead of DPRINTK here. */
printk("comedi: comedi%d: amplc_pci230: "
"ai_cmdtest: Buggy PCI230+/260+ "
"h/w version %u requires first channel "
"of multi-channel sequence to be 0 "
"(corrected in h/w version 4)\n",
dev->minor, devpriv->hwver);
dev_info(dev->class_dev,
"amplc_pci230: ai_cmdtest: Buggy PCI230+/260+ h/w version %u requires first channel of multi-channel sequence to be 0 (corrected in h/w version 4)\n",
devpriv->hwver);
}
}
}
Expand Down

0 comments on commit 2628f46

Please sign in to comment.