*/
#include "../comedidev.h"
+#include <linux/kernel.h>
#include <linux/delay.h>
#include "comedi_fc.h"
#include "comedi_pci.h"
struct comedi_subdevice *s;
int bus, slot;
- printk("comedi: attempt to attach...\n");
- printk("comedi%d: adl_pci8164\n", dev->minor);
+ printk(KERN_INFO "comedi: attempt to attach...\n");
+ printk(KERN_INFO "comedi%d: adl_pci8164\n", dev->minor);
dev->board_name = "pci8164";
bus = it->options[0];
if (bus || slot) {
/* requested particular bus/slot */
if (pcidev->bus->number != bus
- || PCI_SLOT(pcidev->devfn) != slot) {
+ || PCI_SLOT(pcidev->devfn) != slot)
continue;
- }
}
devpriv->pci_dev = pcidev;
if (comedi_pci_enable(pcidev, "adl_pci8164") < 0) {
- printk
- ("comedi%d: Failed to enable PCI device and request regions\n",
- dev->minor);
+ printk(KERN_ERR "comedi%d: Failed to enable "
+ "PCI device and request regions\n", dev->minor);
return -EIO;
}
dev->iobase = pci_resource_start(pcidev, 2);
- printk("comedi: base addr %4lx\n", dev->iobase);
+ printk(KERN_DEBUG "comedi: base addr %4lx\n",
+ dev->iobase);
s = dev->subdevices + 0;
s->type = COMEDI_SUBD_PROC;
s->insn_read = adl_pci8164_insn_read_buf1;
s->insn_write = adl_pci8164_insn_write_buf1;
- printk("comedi: attached\n");
+ printk(KERN_INFO "comedi: attached\n");
return 1;
}
}
- printk("comedi%d: no supported board found! (req. bus/slot : %d/%d)\n",
- dev->minor, bus, slot);
+ printk(KERN_ERR "comedi%d: no supported board found!"
+ "(req. bus/slot : %d/%d)\n", dev->minor, bus, slot);
return -EIO;
}
static int adl_pci8164_detach(struct comedi_device *dev)
{
- printk("comedi%d: pci8164: remove\n", dev->minor);
+ printk(KERN_INFO "comedi%d: pci8164: remove\n", dev->minor);
if (devpriv && devpriv->pci_dev) {
- if (dev->iobase) {
+ if (dev->iobase)
comedi_pci_disable(devpriv->pci_dev);
- }
pci_dev_put(devpriv->pci_dev);
}
}
data[0] = inw(dev->iobase + axis_reg + offset);
- printk("comedi: pci8164 %s read -> %04X:%04X on axis %s\n", action,
- data[0], data[1], axisname);
+ printk(KERN_DEBUG "comedi: pci8164 %s read -> "
+ "%04X:%04X on axis %s\n",
+ action, data[0], data[1], axisname);
}
static int adl_pci8164_insn_read_msts(struct comedi_device *dev,
outw(data[0], dev->iobase + axis_reg + offset);
- printk("comedi: pci8164 %s write -> %04X:%04X on axis %s\n", action,
- data[0], data[1], axisname);
+ printk(KERN_DEBUG "comedi: pci8164 %s write -> "
+ "%04X:%04X on axis %s\n",
+ action, data[0], data[1], axisname);
}