Commit 23d53b17 authored by Benjamin Adolphi's avatar Benjamin Adolphi Committed by Greg Kroah-Hartman

Staging: comedi: c6xdigio: Checkpatch cleanups

This fixes some checkpatch issues and some
spelling mistakes in the c6xdigio comedi driver.
Signed-off-by: default avatarBenjamin Adolphi <b.adolphi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d2e01434
......@@ -45,7 +45,7 @@ This driver will not work with a 2.4 kernel.
#include <linux/interrupt.h>
#include <linux/timex.h>
#include <linux/timer.h>
#include <asm/io.h>
#include <linux/io.h>
#include <linux/pnp.h>
#include "../comedidev.h"
......@@ -220,11 +220,11 @@ static int C6X_encInput(unsigned long baseAddr, unsigned channel)
/* printk("Inside C6X_encInput\n"); */
enc.value = 0;
if (channel == 0) {
if (channel == 0)
ppcmd = 0x48;
} else {
else
ppcmd = 0x50;
}
WriteByteToHwPort(baseAddr, ppcmd);
tmp = ReadByteFromHwPort(baseAddr + 1);
while (((tmp & 0x80) == 0) && (timeout < C6XDIGIO_TIME_OUT)) {
......@@ -391,9 +391,8 @@ static int c6xdigio_ei_insn_read(struct comedi_device *dev,
int n;
int chan = CR_CHAN(insn->chanspec);
for (n = 0; n < insn->n; n++) {
for (n = 0; n < insn->n; n++)
data[n] = (C6X_encInput(dev->iobase, chan) & 0xffffff);
}
return n;
}
......@@ -420,9 +419,9 @@ static void board_init(struct comedi_device *dev)
static const struct pnp_device_id c6xdigio_pnp_tbl[] = {
/* Standard LPT Printer Port */
{.id = "PNP0400",.driver_data = 0},
{.id = "PNP0400", .driver_data = 0},
/* ECP Printer Port */
{.id = "PNP0401",.driver_data = 0},
{.id = "PNP0401", .driver_data = 0},
{}
};
......@@ -452,15 +451,14 @@ static int c6xdigio_attach(struct comedi_device *dev,
if (result < 0)
return result;
/* Make sure that PnP ports gets activated */
/* Make sure that PnP ports get activated */
pnp_register_driver(&c6xdigio_pnp_driver);
irq = it->options[1];
if (irq > 0) {
if (irq > 0)
printk("comedi%d: irq = %u ignored\n", dev->minor, irq);
} else if (irq == 0) {
else if (irq == 0)
printk("comedi%d: no irq\n", dev->minor);
}
s = dev->subdevices + 0;
/* pwm output subdevice */
......@@ -483,19 +481,19 @@ static int c6xdigio_attach(struct comedi_device *dev,
s->maxdata = 0xffffff;
s->range_table = &range_unknown;
/* s = dev->subdevices + 2; */
/* s = dev->subdevices + 2; */
/* pwm output subdevice */
/* s->type = COMEDI_SUBD_COUNTER; // Not sure what to put here */
/* s->subdev_flags = SDF_WRITEABLE; */
/* s->n_chan = 1; */
/* s->trig[0] = c6xdigio_ei_init; */
/* s->insn_read = c6xdigio_ei_init_insn_read; */
/* s->insn_write = c6xdigio_ei_init_insn_write; */
/* s->maxdata = 0xFFFF; // Really just a don't care */
/* s->range_table = &range_unknown; // Not sure what to put here */
/* I will call this init anyway but more than likely the DSP board will not be connect */
/* when device driver is loaded. */
/* s->type = COMEDI_SUBD_COUNTER; // Not sure what to put here */
/* s->subdev_flags = SDF_WRITEABLE; */
/* s->n_chan = 1; */
/* s->trig[0] = c6xdigio_ei_init; */
/* s->insn_read = c6xdigio_ei_init_insn_read; */
/* s->insn_write = c6xdigio_ei_init_insn_write; */
/* s->maxdata = 0xFFFF; // Really just a don't care */
/* s->range_table = &range_unknown; // Not sure what to put here */
/* I will call this init anyway but more than likely the DSP board */
/* will not be connected when device driver is loaded. */
board_init(dev);
return 0;
......@@ -503,16 +501,17 @@ static int c6xdigio_attach(struct comedi_device *dev,
static int c6xdigio_detach(struct comedi_device *dev)
{
/* board_halt(dev); may not need this */
/* board_halt(dev); may not need this */
printk("comedi%d: c6xdigio: remove\n", dev->minor);
if (dev->iobase) {
if (dev->iobase)
release_region(dev->iobase, C6XDIGIO_SIZE);
}
if (dev->irq) {
/* Not using IRQ so I am not sure if I need this */
if (dev->irq)
free_irq(dev->irq, dev);
} /* Not using IRQ so I am not sure if I need this */
pnp_unregister_driver(&c6xdigio_pnp_driver);
return 0;
......
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