Fix the alignment issues in all the comedi drivers.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 
        if (!devpriv->ctrl) {
                dev_warn(dev->class_dev,
-                       "Interrupts disabled due to mode configuration!\n");
+                        "Interrupts disabled due to mode configuration!\n");
                return -EINVAL;
        }
 
 }
 
 static int apci1032_auto_attach(struct comedi_device *dev,
-                                         unsigned long context_unused)
+                               unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct apci1032_private *devpriv;
 
 
        if (!devpriv->ctrl) {
                dev_warn(dev->class_dev,
-                       "Interrupts disabled due to mode configuration!\n");
+                        "Interrupts disabled due to mode configuration!\n");
                return -EINVAL;
        }
 
 }
 
 static int apci1564_auto_attach(struct comedi_device *dev,
-                                     unsigned long context_unused)
+                               unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct apci1564_private *devpriv;
 
                outb(NVCMD_LOAD_HIGH, iobase + AMCC_OP_REG_MCSR_NVCMD);
                apci3501_eeprom_wait(iobase);
                outb(((addr + i) >> 8) & 0xff,
-                       iobase + AMCC_OP_REG_MCSR_NVDATA);
+                    iobase + AMCC_OP_REG_MCSR_NVDATA);
                apci3501_eeprom_wait(iobase);
 
                /* Read the eeprom data byte */
 
 
                /* Time base is 20ms, let the user know the timeout */
                dev_info(dev->class_dev, "watchdog enabled, timeout:%dms\n",
-                       20 * reload + 20);
+                        20 * reload + 20);
                break;
        case INSN_CONFIG_DISARM:
                spriv->wdog_ctrl = 0;
 
 }
 
 static int adl_pci8164_auto_attach(struct comedi_device *dev,
-                                            unsigned long context_unused)
+                                  unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct comedi_subdevice *s;
 
        /*  This is the same gain on every channel */
 
        outb(CR_RANGE(cmd->chanlist[0]) & PCI9111_AI_RANGE_MASK,
-               dev->iobase + PCI9111_AI_RANGE_STAT_REG);
+            dev->iobase + PCI9111_AI_RANGE_STAT_REG);
 
        /*  Set timer pacer */
        dev_private->scan_delay = 0;
        status = inb(dev->iobase + PCI9111_AI_RANGE_STAT_REG);
        if ((status & PCI9111_AI_RANGE_MASK) != range) {
                outb(range & PCI9111_AI_RANGE_MASK,
-                       dev->iobase + PCI9111_AI_RANGE_STAT_REG);
+                    dev->iobase + PCI9111_AI_RANGE_STAT_REG);
        }
 
        pci9111_fifo_reset(dev);
 }
 
 static int pci9111_auto_attach(struct comedi_device *dev,
-                                        unsigned long context_unused)
+                              unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct pci9111_private_data *dev_private;
 
 /* outl(0x02000000|AINT_WRITE_COMPL, devpriv->iobase_a+AMCC_OP_REG_INTCSR); */
        pci9118_amcc_dma_ena(dev, true);
        outl(inl(devpriv->iobase_a + AMCC_OP_REG_INTCSR) | EN_A2P_TRANSFERS,
-                       devpriv->iobase_a + AMCC_OP_REG_INTCSR);
+            devpriv->iobase_a + AMCC_OP_REG_INTCSR);
                                                /* allow bus mastering */
 
        return 0;
 
 }
 
 static int nvram_read(struct comedi_device *dev, unsigned int address,
-                       uint8_t *data)
+                     uint8_t *data)
 {
        struct cb_pcidas_private *devpriv = dev->private;
        unsigned long iobase = devpriv->s5933_config;
 
 }
 
 static int cb_pcimdda_auto_attach(struct comedi_device *dev,
-                                           unsigned long context_unused)
+                                 unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct comedi_subdevice *s;
 
        s->insn_config = bonding_dio_insn_config;
 
        dev_info(dev->class_dev,
-               "%s: %s attached, %u channels from %u devices\n",
-               dev->driver->driver_name, dev->board_name,
-               devpriv->nchans, devpriv->ndevs);
+                "%s: %s attached, %u channels from %u devices\n",
+                dev->driver->driver_name, dev->board_name,
+                devpriv->nchans, devpriv->ndevs);
 
        return 0;
 }
 
                        desc = &dma->desc[i];
                        if (desc->virt_addr)
                                dma_free_coherent(NULL, desc->maxsize,
-                                               desc->virt_addr, desc->hw_addr);
+                                                 desc->virt_addr,
+                                                 desc->hw_addr);
                }
                kfree(dma->desc);
        }
 
 }
 
 static int contec_auto_attach(struct comedi_device *dev,
-                                       unsigned long context_unused)
+                             unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct comedi_subdevice *s;
 
 }
 
 static int daqboard2000_auto_attach(struct comedi_device *dev,
-                                             unsigned long context_unused)
+                                   unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        const struct daq200_boardtype *board;
 
 
        if (cmd->flags & CMDF_PRIORITY) {
                dev_err(dev->class_dev,
-                        "isa dma transfers cannot be performed with CMDF_PRIORITY, aborting\n");
+                       "isa dma transfers cannot be performed with CMDF_PRIORITY, aborting\n");
                return -1;
        }
 
 
 
                if ((i % 2) != (chan % 2)) {
                        dev_dbg(dev->class_dev,
-                                "even/odd channels must go have even/odd chanlist indices\n");
+                               "even/odd channels must go have even/odd chanlist indices\n");
                        return -EINVAL;
                }
        }
 
 
        if (cmd->scan_begin_src == TRIG_FOLLOW) {
                outw(devpriv->supcsr | DT2821_SUPCSR_STRIG,
-                       dev->iobase + DT2821_SUPCSR_REG);
+                    dev->iobase + DT2821_SUPCSR_REG);
        } else {
                devpriv->supcsr |= DT2821_SUPCSR_XTRIG;
                outw(devpriv->supcsr, dev->iobase + DT2821_SUPCSR_REG);
 
 }
 
 static int dyna_pci10xx_insn_read_ai(struct comedi_device *dev,
-                       struct comedi_subdevice *s,
-                       struct comedi_insn *insn, unsigned int *data)
+                                    struct comedi_subdevice *s,
+                                    struct comedi_insn *insn,
+                                    unsigned int *data)
 {
        struct dyna_pci10xx_private *devpriv = dev->private;
        int n;
 
 /* analog output callback */
 static int dyna_pci10xx_insn_write_ao(struct comedi_device *dev,
-                                struct comedi_subdevice *s,
-                                struct comedi_insn *insn, unsigned int *data)
+                                     struct comedi_subdevice *s,
+                                     struct comedi_insn *insn,
+                                     unsigned int *data)
 {
        struct dyna_pci10xx_private *devpriv = dev->private;
        int n;
 
 /* digital input bit interface */
 static int dyna_pci10xx_di_insn_bits(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data)
+                                    struct comedi_subdevice *s,
+                                    struct comedi_insn *insn,
+                                    unsigned int *data)
 {
        struct dyna_pci10xx_private *devpriv = dev->private;
        u16 d = 0;
 }
 
 static int dyna_pci10xx_auto_attach(struct comedi_device *dev,
-                                             unsigned long context_unused)
+                                   unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct dyna_pci10xx_private *devpriv;
 
 }
 
 static int icp_multi_auto_attach(struct comedi_device *dev,
-                                          unsigned long context_unused)
+                                unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct icp_multi_private *devpriv;
 
 
        /* Set both stop bits in the analog input control register */
        outl(ME4000_AI_CTRL_BIT_IMMEDIATE_STOP | ME4000_AI_CTRL_BIT_STOP,
-               dev->iobase + ME4000_AI_CTRL_REG);
+            dev->iobase + ME4000_AI_CTRL_REG);
 
        /* Set both stop bits in the analog output control register */
        val = ME4000_AO_CTRL_BIT_IMMEDIATE_STOP | ME4000_AO_CTRL_BIT_STOP;
 
        /* Set the adustment register for AO demux */
        outl(ME4000_AO_DEMUX_ADJUST_VALUE,
-                   dev->iobase + ME4000_AO_DEMUX_ADJUST_REG);
+            dev->iobase + ME4000_AO_DEMUX_ADJUST_REG);
 
        /*
         * Set digital I/O direction for port 0
 
                        if (!comedi_range_is_bipolar(s, range)) {
                                dev_dbg(dev->class_dev,
-                                      "Bipolar is not selected in differential mode\n");
+                                       "Bipolar is not selected in differential mode\n");
                                return -EINVAL;
                        }
                }
        /* Stop triggers */
        if (cmd->stop_src == TRIG_COUNT) {
                outl(cmd->chanlist_len * cmd->stop_arg,
-                           dev->iobase + ME4000_AI_SAMPLE_COUNTER_REG);
+                    dev->iobase + ME4000_AI_SAMPLE_COUNTER_REG);
                tmp |= ME4000_AI_CTRL_BIT_HF_IRQ | ME4000_AI_CTRL_BIT_SC_IRQ;
        } else if (cmd->stop_src == TRIG_NONE &&
                   cmd->scan_end_src == TRIG_COUNT) {
                outl(cmd->scan_end_arg,
-                           dev->iobase + ME4000_AI_SAMPLE_COUNTER_REG);
+                    dev->iobase + ME4000_AI_SAMPLE_COUNTER_REG);
                tmp |= ME4000_AI_CTRL_BIT_HF_IRQ | ME4000_AI_CTRL_BIT_SC_IRQ;
        } else {
                tmp |= ME4000_AI_CTRL_BIT_HF_IRQ;
 {
        if (comedi_dio_update_state(s, data)) {
                outl((s->state >> 0) & 0xFF,
-                           dev->iobase + ME4000_DIO_PORT_0_REG);
+                    dev->iobase + ME4000_DIO_PORT_0_REG);
                outl((s->state >> 8) & 0xFF,
-                           dev->iobase + ME4000_DIO_PORT_1_REG);
+                    dev->iobase + ME4000_DIO_PORT_1_REG);
                outl((s->state >> 16) & 0xFF,
-                           dev->iobase + ME4000_DIO_PORT_2_REG);
+                    dev->iobase + ME4000_DIO_PORT_2_REG);
                outl((s->state >> 24) & 0xFF,
-                           dev->iobase + ME4000_DIO_PORT_3_REG);
+                    dev->iobase + ME4000_DIO_PORT_3_REG);
        }
 
        data[1] = ((inl(dev->iobase + ME4000_DIO_PORT_0_REG) & 0xFF) << 0) |
 
        if (pcidev->irq > 0) {
                result = request_irq(pcidev->irq, me4000_ai_isr, IRQF_SHARED,
-                                 dev->board_name, dev);
+                                    dev->board_name, dev);
                if (result == 0)
                        dev->irq = pcidev->irq;
        }
        if (!inl(dev->iobase + ME4000_DIO_DIR_REG)) {
                s->io_bits |= 0xFF;
                outl(ME4000_DIO_CTRL_BIT_MODE_0,
-                       dev->iobase + ME4000_DIO_DIR_REG);
+                    dev->iobase + ME4000_DIO_DIR_REG);
        }
 
        /* Counter subdevice (8254) */
 
        }
 
        dev_info(dev->class_dev, "board: %s, ID=0x%02x", dev->board_name,
-              readb(dev->mmio + NI_65XX_ID_REG));
+                readb(dev->mmio + NI_65XX_ID_REG));
 
        ret = comedi_alloc_subdevices(dev, 4);
        if (ret)
 
                start_stop_select |=
                    AI_START_Select(1 + CR_CHAN(cmd->scan_begin_arg));
                ni_stc_writew(dev, start_stop_select,
-                                   AI_START_STOP_Select_Register);
+                             AI_START_STOP_Select_Register);
                break;
        }
 
 
                } else if (it->options[2]) {
                        /* request the irq for the 2nd asic */
                        ret = request_irq(it->options[2], pcmuio_interrupt, 0,
-                                       dev->board_name, dev);
+                                         dev->board_name, dev);
                        if (ret == 0)
                                devpriv->irq2 = it->options[2];
                }
 
        pci_read_config_byte(pcidev, PCI_LATENCY_TIMER, &pci_latency);
        if (pci_latency < 32) {
                dev_info(dev->class_dev,
-                       "PCI latency changed from %d to %d\n",
-                       pci_latency, 32);
+                        "PCI latency changed from %d to %d\n",
+                        pci_latency, 32);
                pci_write_config_byte(pcidev, PCI_LATENCY_TIMER, 32);
        }
 }
 
 /* **************  EEPROM ACCESS FUNCTIONS  ************** */
 
 static int s626_i2c_handshake_eoc(struct comedi_device *dev,
-                                struct comedi_subdevice *s,
-                                struct comedi_insn *insn,
-                                unsigned long context)
+                                 struct comedi_subdevice *s,
+                                 struct comedi_insn *insn,
+                                 unsigned long context)
 {
        bool status;
 
         *  Byte0 = Not sent.
         */
        if (s626_i2c_handshake(dev, S626_I2C_B2(S626_I2C_ATTRSTART,
-                                          (devpriv->i2c_adrs | 1)) |
+                                               (devpriv->i2c_adrs | 1)) |
                                    S626_I2C_B1(S626_I2C_ATTRSTOP, 0) |
                                    S626_I2C_B0(S626_I2C_ATTRNOP, 0)))
                /* Abort function and declare error if handshake failed. */
 /*
  * Private helper function: Write setpoint to an application DAC channel.
  */
-static int s626_set_dac(struct comedi_device *dev, uint16_t chan,
-                        int16_t dacdata)
+static int s626_set_dac(struct comedi_device *dev,
+                       uint16_t chan, int16_t dacdata)
 {
        struct s626_private *devpriv = dev->private;
        uint16_t signmask;
        return s626_send_dac(dev, val);
 }
 
-static int s626_write_trim_dac(struct comedi_device *dev, uint8_t logical_chan,
-                               uint8_t dac_data)
+static int s626_write_trim_dac(struct comedi_device *dev,
+                              uint8_t logical_chan, uint8_t dac_data)
 {
        struct s626_private *devpriv = dev->private;
        uint32_t chan;
        /* Copy TrimDac setpoint values from EEPROM to TrimDacs. */
        for (i = 0; i < ARRAY_SIZE(s626_trimchan); i++) {
                ret = s626_write_trim_dac(dev, i,
-                                   s626_i2c_read(dev, s626_trimadrs[i]));
+                                         s626_i2c_read(dev, s626_trimadrs[i]));
                if (ret)
                        return ret;
        }
 }
 
 static int s626_auto_attach(struct comedi_device *dev,
-                                     unsigned long context_unused)
+                           unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
        struct s626_private *devpriv;
 
 
        for (i = 0; i < RETRIES; i++) {
                ret = usb_bulk_msg(usb, usb_rcvbulkpipe(usb, 8),
-                                     devpriv->insn_buf, SIZEINSNBUF,
-                                     &nrec, BULK_TIMEOUT);
+                                  devpriv->insn_buf, SIZEINSNBUF,
+                                  &nrec, BULK_TIMEOUT);
                if (ret < 0)
                        return ret;
                if (le16_to_cpu(devpriv->insn_buf[0]) == command)