Staging: comedi: dt2815: Checkpatch cleanups

This fixes all checkpatch issues in the dt2815 comedi driver.

Signed-off-by: Benjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Benjamin Adolphi 2010-02-06 15:02:50 +01:00 committed by Greg Kroah-Hartman
parent d3c796fd57
commit 0acc516aee

View file

@ -61,17 +61,11 @@ Configuration options:
#include <linux/ioport.h>
#include <linux/delay.h>
static const struct comedi_lrange range_dt2815_ao_32_current = { 1, {
RANGE_mA(0,
32)
}
};
static const struct comedi_lrange
range_dt2815_ao_32_current = {1, {RANGE_mA(0, 32)} };
static const struct comedi_lrange range_dt2815_ao_20_current = { 1, {
RANGE_mA(4,
20)
}
};
static const struct comedi_lrange
range_dt2815_ao_20_current = {1, {RANGE_mA(4, 20)} };
#define DT2815_SIZE 2
@ -118,9 +112,8 @@ static int dt2815_ao_insn_read(struct comedi_device *dev,
int i;
int chan = CR_CHAN(insn->chanspec);
for (i = 0; i < insn->n; i++) {
for (i = 0; i < insn->n; i++)
data[i] = devpriv->ao_readback[chan];
}
return i;
}
@ -139,9 +132,8 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,
status = dt2815_wait_for_status(dev, 0x00);
if (status != 0) {
printk
("dt2815: failed to write low byte on %d reason %x\n",
chan, status);
printk(KERN_WARNING "dt2815: failed to write low byte "
"on %d reason %x\n", chan, status);
return -EBUSY;
}
@ -149,9 +141,8 @@ static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,
status = dt2815_wait_for_status(dev, 0x10);
if (status != 0x10) {
printk
("dt2815: failed to write high byte on %d reason %x\n",
chan, status);
printk(KERN_WARNING "dt2815: failed to write high byte "
"on %d reason %x\n", chan, status);
return -EBUSY;
}
devpriv->ao_readback[chan] = data[i];
@ -191,9 +182,9 @@ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned long iobase;
iobase = it->options[0];
printk("comedi%d: dt2815: 0x%04lx ", dev->minor, iobase);
printk(KERN_INFO "comedi%d: dt2815: 0x%04lx ", dev->minor, iobase);
if (!request_region(iobase, DT2815_SIZE, "dt2815")) {
printk("I/O port conflict\n");
printk(KERN_WARNING "I/O port conflict\n");
return -EIO;
}
@ -236,18 +227,16 @@ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it)
unsigned int program;
program = (it->options[4] & 0x3) << 3 | 0x7;
outb(program, dev->iobase + DT2815_DATA);
printk(", program: 0x%x (@t=%d)\n", program, i);
printk(KERN_INFO ", program: 0x%x (@t=%d)\n",
program, i);
break;
} else if (status != 0x00) {
printk("dt2815: unexpected status 0x%x (@t=%d)\n",
status, i);
if (status & 0x60) {
printk(KERN_WARNING "dt2815: unexpected status 0x%x "
"(@t=%d)\n", status, i);
if (status & 0x60)
outb(0x00, dev->iobase + DT2815_STATUS);
}
}
}
printk("\n");
return 0;
}
@ -260,7 +249,7 @@ static void dt2815_free_resources(struct comedi_device *dev)
static int dt2815_detach(struct comedi_device *dev)
{
printk("comedi%d: dt2815: remove\n", dev->minor);
printk(KERN_INFO "comedi%d: dt2815: remove\n", dev->minor);
dt2815_free_resources(dev);