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

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
Loading
Loading
Loading
Loading
+28 −29
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ http://robot0.ge.uiuc.edu/~spong/mecha/
#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;
}
@@ -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 */
@@ -494,8 +492,8 @@ static int c6xdigio_attach(struct comedi_device *dev,
	/*	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. */
	/*  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;
@@ -507,12 +505,13 @@ static int c6xdigio_detach(struct comedi_device *dev)

	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;