Commit 293d5671 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcl730: tidy up pcl730_attach()

For aesthetic reasons, add some whitespace to the subdevice init
and reorder it a bit.

Remove the blank line printk at the end of the attach.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 74f14a58
...@@ -78,7 +78,8 @@ static int pcl730_di_insn_bits(struct comedi_device *dev, ...@@ -78,7 +78,8 @@ static int pcl730_di_insn_bits(struct comedi_device *dev,
return insn->n; return insn->n;
} }
static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it) static int pcl730_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{ {
const struct pcl730_board *board = comedi_board(dev); const struct pcl730_board *board = comedi_board(dev);
struct comedi_subdevice *s; struct comedi_subdevice *s;
...@@ -92,48 +93,46 @@ static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -92,48 +93,46 @@ static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it)
if (ret) if (ret)
return ret; return ret;
/* Isolated Digital Outputs */
s = &dev->subdevices[0]; s = &dev->subdevices[0];
/* Isolated do */
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITABLE; s->subdev_flags = SDF_WRITABLE;
s->maxdata = 1;
s->n_chan = 16; s->n_chan = 16;
s->insn_bits = pcl730_do_insn_bits; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = pcl730_do_insn_bits;
s->private = (void *)PCL730_IDIO_LO; s->private = (void *)PCL730_IDIO_LO;
/* Isolated Digital Inputs */
s = &dev->subdevices[1]; s = &dev->subdevices[1];
/* Isolated di */
s->type = COMEDI_SUBD_DI; s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE; s->subdev_flags = SDF_READABLE;
s->maxdata = 1;
s->n_chan = 16; s->n_chan = 16;
s->insn_bits = pcl730_di_insn_bits; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = pcl730_di_insn_bits;
s->private = (void *)PCL730_IDIO_LO; s->private = (void *)PCL730_IDIO_LO;
/* TTL Digital Outputs */
s = &dev->subdevices[2]; s = &dev->subdevices[2];
/* TTL do */
s->type = COMEDI_SUBD_DO; s->type = COMEDI_SUBD_DO;
s->subdev_flags = SDF_WRITABLE; s->subdev_flags = SDF_WRITABLE;
s->maxdata = 1;
s->n_chan = 16; s->n_chan = 16;
s->insn_bits = pcl730_do_insn_bits; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = pcl730_do_insn_bits;
s->private = (void *)PCL730_DIO_LO; s->private = (void *)PCL730_DIO_LO;
/* TTL Digital Inputs */
s = &dev->subdevices[3]; s = &dev->subdevices[3];
/* TTL di */
s->type = COMEDI_SUBD_DI; s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE; s->subdev_flags = SDF_READABLE;
s->maxdata = 1;
s->n_chan = 16; s->n_chan = 16;
s->insn_bits = pcl730_di_insn_bits; s->maxdata = 1;
s->range_table = &range_digital; s->range_table = &range_digital;
s->insn_bits = pcl730_di_insn_bits;
s->private = (void *)PCL730_DIO_LO; s->private = (void *)PCL730_DIO_LO;
printk(KERN_INFO "\n");
return 0; 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