Commit 06033fce authored by Darren Armstrong's avatar Darren Armstrong Committed by Greg Kroah-Hartman

Staging: comedi: ssc_dnp: Fixed coding style issues

Fixed coding style issues: 80-char width limit, KERN_ facility level
Signed-off-by: default avatarDarren Armstrong <darren.armstrong85@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b4ae23ce
......@@ -59,8 +59,9 @@ struct dnp_board {
int have_dio;
};
static const struct dnp_board dnp_boards[] = { /* we only support one DNP 'board' */
{ /* variant at the moment */
/* We only support one DNP 'board' variant at the moment */
static const struct dnp_board dnp_boards[] = {
{
.name = "dnp-1486",
.ai_chans = 16,
.ai_bits = 12,
......@@ -80,9 +81,9 @@ struct dnp_private_data {
#define devpriv ((dnp_private *)dev->private)
/* ------------------------------------------------------------------------- */
/* The struct comedi_driver structure tells the Comedi core module which functions */
/* to call to configure/deconfigure (attach/detach) the board, and also */
/* about the kernel module that contains the device code. */
/* The struct comedi_driver structure tells the Comedi core module which */
/* functions to call to configure/deconfigure (attach/detach) the board, and */
/* also about the kernel module that contains the device code. */
/* */
/* In the following section we define the API of this driver. */
/* ------------------------------------------------------------------------- */
......@@ -97,7 +98,7 @@ static struct comedi_driver driver_dnp = {
.detach = dnp_detach,
.board_name = &dnp_boards[0].name,
/* only necessary for non-PnP devs */
.offset = sizeof(struct dnp_board), /* like ISA-PnP, PCI or PCMCIA. */
.offset = sizeof(struct dnp_board), /* like ISA-PnP, PCI or PCMCIA */
.num_names = ARRAY_SIZE(dnp_boards),
};
......@@ -122,22 +123,24 @@ static int dnp_attach(struct comedi_device *dev, struct comedi_devconfig *it)
struct comedi_subdevice *s;
printk("comedi%d: dnp: ", dev->minor);
printk(KERN_INFO "comedi%d: dnp: ", dev->minor);
/* Autoprobing: this should find out which board we have. Currently only */
/* the 1486 board is supported and autoprobing is not implemented :-) */
/* Autoprobing: this should find out which board we have. Currently */
/* only the 1486 board is supported and autoprobing is not */
/* implemented :-) */
/* dev->board_ptr = dnp_probe(dev); */
/* Initialize the name of the board. We can use the "thisboard" macro now. */
/* Initialize the name of the board. */
/* We can use the "thisboard" macro now. */
dev->board_name = thisboard->name;
/* Allocate the private structure area. alloc_private() is a convenient */
/* macro defined in comedidev.h. */
/* Allocate the private structure area. alloc_private() is a */
/* convenient macro defined in comedidev.h. */
if (alloc_private(dev, sizeof(struct dnp_private_data)) < 0)
return -ENOMEM;
/* Allocate the subdevice structures. alloc_subdevice() is a convenient */
/* macro defined in comedidev.h. */
/* Allocate the subdevice structures. alloc_subdevice() is a */
/* convenient macro defined in comedidev.h. */
if (alloc_subdevices(dev, 1) < 0)
return -ENOMEM;
......@@ -190,7 +193,7 @@ static int dnp_detach(struct comedi_device *dev)
outb((inb(CSCDR) & 0xAA), CSCDR);
/* announce that we are finished */
printk("comedi%d: dnp: remove\n", dev->minor);
printk(KERN_INFO "comedi%d: dnp: remove\n", dev->minor);
return 0;
......@@ -210,12 +213,12 @@ static int dnp_dio_insn_bits(struct comedi_device *dev,
if (insn->n != 2)
return -EINVAL; /* insn uses data[0] and data[1] */
/* The insn data is a mask in data[0] and the new data in data[1], each */
/* channel cooresponding to a bit. */
/* The insn data is a mask in data[0] and the new data in data[1], */
/* each channel cooresponding to a bit. */
/* Ports A and B are straight forward: each bit corresponds to an output */
/* pin with the same order. Port C is different: bits 0...3 correspond to */
/* bits 4...7 of the output register (PCDR). */
/* Ports A and B are straight forward: each bit corresponds to an */
/* output pin with the same order. Port C is different: bits 0...3 */
/* correspond to bits 4...7 of the output register (PCDR). */
if (data[0]) {
......@@ -260,7 +263,8 @@ static int dnp_dio_insn_config(struct comedi_device *dev,
u8 register_buffer;
int chan = CR_CHAN(insn->chanspec); /* reduces chanspec to lower 16 bits */
/* reduces chanspec to lower 16 bits */
int chan = CR_CHAN(insn->chanspec);
switch (data[0]) {
case INSN_CONFIG_DIO_OUTPUT:
......@@ -289,8 +293,8 @@ static int dnp_dio_insn_config(struct comedi_device *dev,
chan -= 8;
outb(PBMR, CSCIR);
} else if ((chan >= 16) && (chan <= 19)) {
/* this is port C; multiplication with 2 brings bits into correct */
/* position for PCMR! */
/* this is port C; multiplication with 2 brings bits into */
/* correct position for PCMR! */
chan -= 16;
chan *= 2;
outb(PCMR, CSCIR);
......
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