Commit bacf58a8 authored by BRAGA, Bruno's avatar BRAGA, Bruno Committed by Greg Kroah-Hartman
Browse files

Staging: comedi: adl_pci8164 coding style fixes



Corrected coding style:
- excessive curly braces
- printk without KERN_* logging
- 80+ chars per line of code

Signed-off-by: default avatarBRAGA, Bruno <bruno.braga@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d1babfd4
Loading
Loading
Loading
Loading
+19 −18
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ Configuration Options:
*/

#include "../comedidev.h"
#include <linux/kernel.h>
#include <linux/delay.h>
#include "comedi_fc.h"
#include "comedi_pci.h"
@@ -128,8 +129,8 @@ static int adl_pci8164_attach(struct comedi_device *dev,
	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];
@@ -150,19 +151,18 @@ static int adl_pci8164_attach(struct comedi_device *dev,
			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;
@@ -204,25 +204,24 @@ static int adl_pci8164_attach(struct comedi_device *dev,
			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);
	}

@@ -267,8 +266,9 @@ static void adl_pci8164_insn_read(struct comedi_device *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,
@@ -347,8 +347,9 @@ static void adl_pci8164_insn_out(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);

}