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>
This commit is contained in:
Greg Kroah-Hartman 2008-11-19 10:34:00 -08:00
parent 8c49292f33
commit 652dd4e7c7
1 changed files with 34 additions and 31 deletions

View File

@ -93,20 +93,20 @@ pin, which can be used to wake up tasks.
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)
@ -142,7 +142,8 @@ 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);
@ -263,7 +264,7 @@ static int parport_intr_cmd(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;
}
@ -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;