Commit 26ac8785 authored by Dirk Hohndel's avatar Dirk Hohndel Committed by Greg Kroah-Hartman

Staging: comedi: ke_counter: fix style issues

80 char limit (where useful)
braces around single line block
KERN_ facility for printk
Signed-off-by: default avatarDirk Hohndel <hohndel@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 13ccea3f
...@@ -192,12 +192,14 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -192,12 +192,14 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it)
} }
} }
} }
printk("comedi%d: no supported board found! (req. bus/slot: %d/%d)\n", printk(KERN_WARNING
"comedi%d: no supported board found! (req. bus/slot: %d/%d)\n",
dev->minor, it->options[0], it->options[1]); dev->minor, it->options[0], it->options[1]);
return -EIO; return -EIO;
found: found:
printk("comedi%d: found %s at PCI bus %d, slot %d\n", dev->minor, printk(KERN_INFO
"comedi%d: found %s at PCI bus %d, slot %d\n", dev->minor,
board->name, pci_device->bus->number, board->name, pci_device->bus->number,
PCI_SLOT(pci_device->devfn)); PCI_SLOT(pci_device->devfn));
devpriv->pcidev = pci_device; devpriv->pcidev = pci_device;
...@@ -206,8 +208,8 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -206,8 +208,8 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it)
/* enable PCI device and request regions */ /* enable PCI device and request regions */
error = comedi_pci_enable(pci_device, CNT_DRIVER_NAME); error = comedi_pci_enable(pci_device, CNT_DRIVER_NAME);
if (error < 0) { if (error < 0) {
printk printk(KERN_WARNING "comedi%d: "
("comedi%d: failed to enable PCI device and request regions!\n", "failed to enable PCI device and request regions!\n",
dev->minor); dev->minor);
return error; return error;
} }
...@@ -239,7 +241,8 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -239,7 +241,8 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it)
outb(0, dev->iobase + 0x20); outb(0, dev->iobase + 0x20);
outb(0, dev->iobase + 0x40); outb(0, dev->iobase + 0x40);
printk("comedi%d: " CNT_DRIVER_NAME " attached.\n", dev->minor); printk(KERN_INFO "comedi%d: " CNT_DRIVER_NAME " attached.\n",
dev->minor);
return 0; return 0;
} }
...@@ -248,11 +251,11 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -248,11 +251,11 @@ static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it)
static int cnt_detach(struct comedi_device *dev) static int cnt_detach(struct comedi_device *dev)
{ {
if (devpriv && devpriv->pcidev) { if (devpriv && devpriv->pcidev) {
if (dev->iobase) { if (dev->iobase)
comedi_pci_disable(devpriv->pcidev); comedi_pci_disable(devpriv->pcidev);
}
pci_dev_put(devpriv->pcidev); pci_dev_put(devpriv->pcidev);
} }
printk("comedi%d: " CNT_DRIVER_NAME " remove\n", dev->minor); printk(KERN_INFO "comedi%d: " CNT_DRIVER_NAME " remove\n",
dev->minor);
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment