aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-11-19 10:34:00 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:52:25 -0800
commit652dd4e7c78a2ad1fcf38c12e8be69651922c690 (patch)
tree511c3cecd9ff38ee3f7c97770652e8ffb32ba82b /drivers/staging/comedi
parent8c49292f33c00ed920e0df0c66f4057590fe33e2 (diff)
Staging: comedi: fix comedi_parport.c checkpatch.pl issues.
This resolves all the resolvable checkpatch.pl issues in the comedi_parport.c file. Cc: David Schleef <ds@schleef.org> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/drivers/comedi_parport.c65
1 files changed, 34 insertions, 31 deletions
diff --git a/drivers/staging/comedi/drivers/comedi_parport.c b/drivers/staging/comedi/drivers/comedi_parport.c
index 9530c47806c..ba838fffa29 100644
--- a/drivers/staging/comedi/drivers/comedi_parport.c
+++ b/drivers/staging/comedi/drivers/comedi_parport.c
@@ -90,26 +90,26 @@ pin, which can be used to wake up tasks.
#define PARPORT_B 1
#define PARPORT_C 2
-static int parport_attach(comedi_device * dev, comedi_devconfig * it);
-static int parport_detach(comedi_device * dev);
+static int parport_attach(comedi_device *dev, comedi_devconfig *it);
+static int parport_detach(comedi_device *dev);
static comedi_driver driver_parport = {
- driver_name:"comedi_parport",
- module:THIS_MODULE,
- attach:parport_attach,
- detach:parport_detach,
+ .driver_name = "comedi_parport",
+ .module = THIS_MODULE,
+ .attach = parport_attach,
+ .detach = parport_detach,
};
COMEDI_INITCLEANUP(driver_parport);
-typedef struct parport_private_struct {
+struct parport_private {
unsigned int a_data;
unsigned int c_data;
int enable_irq;
-} parport_private;
-#define devpriv ((parport_private *)(dev->private))
+};
+#define devpriv ((struct parport_private *)(dev->private))
-static int parport_insn_a(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, lsampl_t * data)
+static int parport_insn_a(comedi_device *dev, comedi_subdevice *s,
+ comedi_insn *insn, lsampl_t *data)
{
if (data[0]) {
devpriv->a_data &= ~data[0];
@@ -123,8 +123,8 @@ static int parport_insn_a(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int parport_insn_config_a(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, lsampl_t * data)
+static int parport_insn_config_a(comedi_device *dev, comedi_subdevice *s,
+ comedi_insn *insn, lsampl_t *data)
{
if (data[0]) {
s->io_bits = 0xff;
@@ -138,11 +138,12 @@ static int parport_insn_config_a(comedi_device * dev, comedi_subdevice * s,
return 1;
}
-static int parport_insn_b(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, lsampl_t * data)
+static int parport_insn_b(comedi_device *dev, comedi_subdevice *s,
+ comedi_insn *insn, lsampl_t *data)
{
if (data[0]) {
- // should writes be ignored?
+ /* should writes be ignored? */
+ /* anyone??? */
}
data[1] = (inb(dev->iobase + PARPORT_B) >> 3);
@@ -150,8 +151,8 @@ static int parport_insn_b(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int parport_insn_c(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, lsampl_t * data)
+static int parport_insn_c(comedi_device *dev, comedi_subdevice *s,
+ comedi_insn *insn, lsampl_t *data)
{
data[0] &= 0x0f;
if (data[0]) {
@@ -166,8 +167,8 @@ static int parport_insn_c(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int parport_intr_insn(comedi_device * dev, comedi_subdevice * s,
- comedi_insn * insn, lsampl_t * data)
+static int parport_intr_insn(comedi_device *dev, comedi_subdevice *s,
+ comedi_insn *insn, lsampl_t *data)
{
if (insn->n < 1)
return -EINVAL;
@@ -176,8 +177,8 @@ static int parport_intr_insn(comedi_device * dev, comedi_subdevice * s,
return 2;
}
-static int parport_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
- comedi_cmd * cmd)
+static int parport_intr_cmdtest(comedi_device *dev, comedi_subdevice *s,
+ comedi_cmd *cmd)
{
int err = 0;
int tmp;
@@ -251,7 +252,7 @@ static int parport_intr_cmdtest(comedi_device * dev, comedi_subdevice * s,
return 0;
}
-static int parport_intr_cmd(comedi_device * dev, comedi_subdevice * s)
+static int parport_intr_cmd(comedi_device *dev, comedi_subdevice *s)
{
devpriv->c_data |= 0x10;
outb(devpriv->c_data, dev->iobase + PARPORT_C);
@@ -261,9 +262,9 @@ static int parport_intr_cmd(comedi_device * dev, comedi_subdevice * s)
return 0;
}
-static int parport_intr_cancel(comedi_device * dev, comedi_subdevice * s)
+static int parport_intr_cancel(comedi_device *dev, comedi_subdevice *s)
{
- printk("parport_intr_cancel()\n");
+ printk(KERN_DEBUG "parport_intr_cancel()\n");
devpriv->c_data &= ~0x10;
outb(devpriv->c_data, dev->iobase + PARPORT_C);
@@ -279,7 +280,7 @@ static irqreturn_t parport_interrupt(int irq, void *d PT_REGS_ARG)
comedi_subdevice *s = dev->subdevices + 3;
if (!devpriv->enable_irq) {
- printk("comedi_parport: bogus irq, ignored\n");
+ printk(KERN_ERR "comedi_parport: bogus irq, ignored\n");
return IRQ_NONE;
}
@@ -290,7 +291,7 @@ static irqreturn_t parport_interrupt(int irq, void *d PT_REGS_ARG)
return IRQ_HANDLED;
}
-static int parport_attach(comedi_device * dev, comedi_devconfig * it)
+static int parport_attach(comedi_device *dev, comedi_devconfig *it)
{
int ret;
unsigned int irq;
@@ -298,7 +299,7 @@ static int parport_attach(comedi_device * dev, comedi_devconfig * it)
comedi_subdevice *s;
iobase = it->options[0];
- printk("comedi%d: parport: 0x%04lx ", dev->minor, iobase);
+ printk(KERN_INFO "comedi%d: parport: 0x%04lx ", dev->minor, iobase);
if (!request_region(iobase, PARPORT_SIZE, "parport (comedi)")) {
printk("I/O port conflict\n");
return -EIO;
@@ -318,9 +319,11 @@ static int parport_attach(comedi_device * dev, comedi_devconfig * it)
}
dev->board_name = "parport";
- if ((ret = alloc_subdevices(dev, 4)) < 0)
+ ret = alloc_subdevices(dev, 4);
+ if (ret < 0)
return ret;
- if ((ret = alloc_private(dev, sizeof(parport_private))) < 0)
+ ret = alloc_private(dev, sizeof(struct parport_private));
+ if (ret < 0)
return ret;
s = dev->subdevices + 0;
@@ -373,7 +376,7 @@ static int parport_attach(comedi_device * dev, comedi_devconfig * it)
return 1;
}
-static int parport_detach(comedi_device * dev)
+static int parport_detach(comedi_device *dev)
{
printk("comedi%d: parport: remove\n", dev->minor);