This is a patch to the pcmuio.c file that fixes up a line over 80 character warning found by the checkpatch.pl tool Signed-off-by: Ravishankar K Mallikarjunayya <ravishankar.km@xxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/pcmuio.c | 110 ++++++++++++++++++++++--------- 1 files changed, 79 insertions(+), 31 deletions(-) diff --git a/drivers/staging/comedi/drivers/pcmuio.c b/drivers/staging/comedi/drivers/pcmuio.c index b2c2c89..8c82e45 100644 --- a/drivers/staging/comedi/drivers/pcmuio.c +++ b/drivers/staging/comedi/drivers/pcmuio.c @@ -119,9 +119,11 @@ Configuration Options: #define REG_PORT4 0x4 #define REG_PORT5 0x5 #define REG_INT_PENDING 0x6 -#define REG_PAGELOCK 0x7 /* page selector register, upper 2 bits select a page - and bits 0-5 are used to 'lock down' a particular - port above to make it readonly. */ +#define REG_PAGELOCK 0x7 /* + * page selector register, upper 2 bits select + * a page and bits 0-5 are used to 'lock down' + * a particular port above to make it readonly. + */ #define REG_POL0 0x8 #define REG_POL1 0x9 #define REG_POL2 0xA @@ -138,7 +140,7 @@ Configuration Options: #define REG_PAGE_BITOFFSET 6 #define REG_LOCK_BITOFFSET 0 #define REG_PAGE_MASK (~((0x1<<REG_PAGE_BITOFFSET)-1)) -#define REG_LOCK_MASK ~(REG_PAGE_MASK) +#define REG_LOCK_MASK (~(REG_PAGE_MASK)) #define PAGE_POL 1 #define PAGE_ENAB 2 #define PAGE_INT_ID 3 @@ -180,15 +182,31 @@ struct pcmuio_subdev_private { /* The below is only used for intr subdevices */ struct { - int asic; /* if non-negative, this subdev has an interrupt asic */ - int first_chan; /* if nonnegative, the first channel id for - interrupts. */ - int num_asic_chans; /* the number of asic channels in this subdev - that have interrutps */ - int asic_chan; /* if nonnegative, the first channel id with - respect to the asic that has interrupts */ - int enabled_mask; /* subdev-relative channel mask for channels - we are interested in */ + /* + * if non-negative, this subdev has an + * interrupt asic + */ + int asic; + /* + * if nonnegative, the first channel id for + * interrupts. + */ + int first_chan; + /* + * the number of asic channels in this subdev + * that have interrutps + */ + int num_asic_chans; + /* + * if nonnegative, the first channel id with + * respect to the asic that has interrupts + */ + int asic_chan; + /* + * subdev-relative channel mask for channels + * we are interested in + */ + int enabled_mask; int active; int stop_count; int continuous; @@ -202,8 +220,10 @@ struct pcmuio_subdev_private { struct pcmuio_private { struct { unsigned char pagelock; /* current page and lock */ - unsigned char pol[NUM_PAGED_REGS]; /* shadow of POLx registers */ - unsigned char enab[NUM_PAGED_REGS]; /* shadow of ENABx registers */ + /* shadow of POLx registers */ + unsigned char pol[NUM_PAGED_REGS]; + /* shadow of ENABx registers */ + unsigned char enab[NUM_PAGED_REGS]; int num; unsigned long iobase; unsigned int irq; @@ -271,7 +291,8 @@ static int pcmuio_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_cmd *cmd); /* some helper functions to deal with specifics of this device's registers */ -static void init_asics(struct comedi_device *dev); /* sets up/clears ASIC chips to defaults */ +/* sets up/clears ASIC chips to defaults */ +static void init_asics(struct comedi_device *dev); static void switch_page(struct comedi_device *dev, int asic, int page); #ifdef notused static void lock_port(struct comedi_device *dev, int asic, int port); @@ -325,9 +346,11 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) for (asic = 0; asic < MAX_ASICS; ++asic) { devpriv->asics[asic].num = asic; devpriv->asics[asic].iobase = dev->iobase + asic * ASIC_IOSIZE; - devpriv->asics[asic].irq = 0; /* this gets actually set at the end of - this function when we - request_irqs */ + /* + * this gets actually set at the end of this function when we + * request_irqs + */ + devpriv->asics[asic].irq = 0; spin_lock_init(&devpriv->asics[asic].spinlock); } @@ -387,7 +410,10 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) if (thisasic_chanct < CHANS_PER_PORT * INTR_PORTS_PER_ASIC && subpriv->intr.asic < 0) { - /* this is an interrupt subdevice, so setup the struct */ + /* + * this is an interrupt subdevice, + * so setup the struct + */ subpriv->intr.asic = asic; subpriv->intr.active = 0; subpriv->intr.stop_count = 0; @@ -409,7 +435,11 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) chans_left -= s->n_chan; if (!chans_left) { - asic = 0; /* reset the asic to our first asic, to do intr subdevs */ + /* + * reset the asic to our first asic, + * to do intr subdevs + */ + asic = 0; port = 0; } @@ -432,8 +462,10 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it) devpriv->asics[asic].irq = irq[asic]; } - dev->irq = irq[0]; /* grr.. wish comedi dev struct supported multiple - irqs.. */ + dev->irq = irq[0]; /* + * grr.. wish comedi dev struct supported + * multiple irqs.. + */ if (irq[0]) { printk("irq: %u ", irq[0]); @@ -529,7 +561,10 @@ static int pcmuio_dio_insn_bits(struct comedi_device *dev, #endif if (write_mask_byte) { - /* this byte has some write_bits -- so set the output lines */ + /* + * this byte has some write_bits + * -- so set the output lines + */ byte &= ~write_mask_byte; /* clear bits for write mask */ byte |= ~data_byte & write_mask_byte; /* set to inverted data_byte */ /* Write out the new digital output state */ @@ -595,9 +630,11 @@ static int pcmuio_dio_insn_config(struct comedi_device *dev, byte &= ~(1 << bit_no); /**< set input channel to '0' */ - /* write out byte -- this is the only time we actually affect the - hardware as all channels are implicitly output -- but input - channels are set to float-high */ + /* + * write out byte -- this is the only time we actually affect + * the hardware as all channels are implicitly output + * -- but input channels are set to float-high + */ outb(byte, ioaddr); /* save to io_bits */ @@ -651,7 +688,8 @@ static void init_asics(struct comedi_device *dev) outb(0xff, baseaddr + REG_ENAB0); */ /* END DEBUG */ - switch_page(dev, asic, 0); /* switch back to default page 0 */ + /* switch back to default page 0 */ + switch_page(dev, asic, 0); } } @@ -730,7 +768,10 @@ static irqreturn_t interrupt_pcmuio(int irq, void *d) REG_INT_ID0 + port); if (io_lines_with_edges) - /* clear pending interrupt */ + /* + * clear pending + * interrupt + */ outb(0, iobase + REG_INT_ID0 + port); @@ -749,14 +790,21 @@ static irqreturn_t interrupt_pcmuio(int irq, void *d) if (triggered) { struct comedi_subdevice *s; - /* TODO here: dispatch io lines to subdevs with commands.. */ + /* + * TODO here: dispatch io lines to subdevs + * with commands.. + */ printk ("PCMUIO DEBUG: got edge detect interrupt %d asic %d which_chans: %06x\n", irq, asic, triggered); for (s = dev->subdevices; s < dev->subdevices + dev->n_subdevices; ++s) { - if (subpriv->intr.asic == asic) { /* this is an interrupt subdev, and it matches this asic! */ + /* + * this is an interrupt subdev, + * and it matches this asic! + */ + if (subpriv->intr.asic == asic) { unsigned long flags; unsigned oldevents; -- 1.6.5.2 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel