Commit ff492d38 authored by Bruce Jones's avatar Bruce Jones Committed by Greg Kroah-Hartman

Staging: comedi: adl_pci7432: coding style cleanup

Correct coding style problems in this file.
Signed-off-by: default avatarBruce Jones <brucej@linux.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1ab1774f
...@@ -90,8 +90,7 @@ static int adl_pci7432_attach(struct comedi_device *dev, ...@@ -90,8 +90,7 @@ static int adl_pci7432_attach(struct comedi_device *dev,
struct comedi_subdevice *s; struct comedi_subdevice *s;
int bus, slot; int bus, slot;
printk("comedi: attempt to attach...\n"); printk(KERN_INFO "comedi%d: attach adl_pci7432\n", dev->minor);
printk("comedi%d: adl_pci7432\n", dev->minor);
dev->board_name = "pci7432"; dev->board_name = "pci7432";
bus = it->options[0]; bus = it->options[0];
...@@ -118,13 +117,13 @@ static int adl_pci7432_attach(struct comedi_device *dev, ...@@ -118,13 +117,13 @@ static int adl_pci7432_attach(struct comedi_device *dev,
} }
devpriv->pci_dev = pcidev; devpriv->pci_dev = pcidev;
if (comedi_pci_enable(pcidev, "adl_pci7432") < 0) { if (comedi_pci_enable(pcidev, "adl_pci7432") < 0) {
printk printk(KERN_ERR "comedi%d: Failed to enable PCI device and request regions\n",
("comedi%d: Failed to enable PCI device and request regions\n",
dev->minor); dev->minor);
return -EIO; return -EIO;
} }
dev->iobase = pci_resource_start(pcidev, 2); dev->iobase = pci_resource_start(pcidev, 2);
printk("comedi: base addr %4lx\n", dev->iobase); printk(KERN_INFO "comedi: base addr %4lx\n",
dev->iobase);
s = dev->subdevices + 0; s = dev->subdevices + 0;
s->type = COMEDI_SUBD_DI; s->type = COMEDI_SUBD_DI;
...@@ -148,25 +147,24 @@ static int adl_pci7432_attach(struct comedi_device *dev, ...@@ -148,25 +147,24 @@ static int adl_pci7432_attach(struct comedi_device *dev,
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = adl_pci7432_do_insn_bits; s->insn_bits = adl_pci7432_do_insn_bits;
printk("comedi: attached\n"); printk(KERN_DEBUG "comedi%d: adl_pci7432 attached\n",
dev->minor);
return 1; return 1;
} }
} }
printk("comedi%d: no supported board found! (req. bus/slot : %d/%d)\n", printk(KERN_ERR "comedi%d: no supported board found! (req. bus/slot : %d/%d)\n",
dev->minor, bus, slot); dev->minor, bus, slot);
return -EIO; return -EIO;
} }
static int adl_pci7432_detach(struct comedi_device *dev) static int adl_pci7432_detach(struct comedi_device *dev)
{ {
printk("comedi%d: pci7432: remove\n", dev->minor); printk(KERN_INFO "comedi%d: pci7432: remove\n", dev->minor);
if (devpriv && devpriv->pci_dev) { if (devpriv && devpriv->pci_dev) {
if (dev->iobase) { if (dev->iobase)
comedi_pci_disable(devpriv->pci_dev); comedi_pci_disable(devpriv->pci_dev);
}
pci_dev_put(devpriv->pci_dev); pci_dev_put(devpriv->pci_dev);
} }
...@@ -178,8 +176,8 @@ static int adl_pci7432_do_insn_bits(struct comedi_device *dev, ...@@ -178,8 +176,8 @@ static int adl_pci7432_do_insn_bits(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
printk("comedi: pci7432_do_insn_bits called\n"); printk(KERN_DEBUG "comedi: pci7432_do_insn_bits called\n");
printk("comedi: data0: %8x data1: %8x\n", data[0], data[1]); printk(KERN_DEBUG "comedi: data0: %8x data1: %8x\n", data[0], data[1]);
if (insn->n != 2) if (insn->n != 2)
return -EINVAL; return -EINVAL;
...@@ -188,7 +186,7 @@ static int adl_pci7432_do_insn_bits(struct comedi_device *dev, ...@@ -188,7 +186,7 @@ static int adl_pci7432_do_insn_bits(struct comedi_device *dev,
s->state &= ~data[0]; s->state &= ~data[0];
s->state |= (data[0] & data[1]); s->state |= (data[0] & data[1]);
printk("comedi: out: %8x on iobase %4lx\n", s->state, printk(KERN_DEBUG "comedi: out: %8x on iobase %4lx\n", s->state,
dev->iobase + PCI7432_DO); dev->iobase + PCI7432_DO);
outl(s->state & 0xffffffff, dev->iobase + PCI7432_DO); outl(s->state & 0xffffffff, dev->iobase + PCI7432_DO);
} }
...@@ -200,14 +198,14 @@ static int adl_pci7432_di_insn_bits(struct comedi_device *dev, ...@@ -200,14 +198,14 @@ static int adl_pci7432_di_insn_bits(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
printk("comedi: pci7432_di_insn_bits called\n"); printk(KERN_DEBUG "comedi: pci7432_di_insn_bits called\n");
printk("comedi: data0: %8x data1: %8x\n", data[0], data[1]); printk(KERN_DEBUG "comedi: data0: %8x data1: %8x\n", data[0], data[1]);
if (insn->n != 2) if (insn->n != 2)
return -EINVAL; return -EINVAL;
data[1] = inl(dev->iobase + PCI7432_DI) & 0xffffffff; data[1] = inl(dev->iobase + PCI7432_DI) & 0xffffffff;
printk("comedi: data1 %8x\n", data[1]); printk(KERN_DEBUG "comedi: data1 %8x\n", data[1]);
return 2; return 2;
} }
......
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