]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
staging: comedi: addi_apci_3120: rename private data 'ui_DmaActualBuffer'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Nov 2014 17:55:10 +0000 (10:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Nov 2014 17:34:04 +0000 (09:34 -0800)
Rename this CamelCase member of the private data and convert it to
a bit-field.

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>
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
drivers/staging/comedi/drivers/addi_apci_3120.c

index 02755066debe94cdc386a6157328758a6287867b..ec488d163587cf69447fcf75a8d97a4a201d24f4 100644 (file)
@@ -95,7 +95,7 @@ static int apci3120_cancel(struct comedi_device *dev,
        outb(devpriv->mode, dev->iobase + APCI3120_MODE_REG);
 
        inw(dev->iobase + APCI3120_STATUS_REG);
-       devpriv->ui_DmaActualBuffer = 0;
+       devpriv->cur_dmabuf = 0;
 
        return 0;
 }
@@ -266,7 +266,7 @@ static int apci3120_ai_cmd(struct comedi_device *dev,
        /* AMCC- Clear write complete interrupt (DMA) */
        outl(AINT_WT_COMPLETE, devpriv->amcc + AMCC_OP_REG_INTCSR);
 
-       devpriv->ui_DmaActualBuffer = 0;
+       devpriv->cur_dmabuf = 0;
 
        /* load chanlist for command scan */
        apci3120_set_chanlist(dev, s, cmd->chanlist_len, cmd->chanlist);
@@ -347,7 +347,7 @@ static void apci3120_interrupt_dma(int irq, void *d)
        struct apci3120_dmabuf *dmabuf;
        unsigned int samplesinbuf;
 
-       dmabuf = &devpriv->dmabuf[devpriv->ui_DmaActualBuffer];
+       dmabuf = &devpriv->dmabuf[devpriv->cur_dmabuf];
 
        samplesinbuf = dmabuf->use_size - inl(devpriv->amcc + AMCC_OP_REG_MWTC);
 
@@ -363,7 +363,7 @@ static void apci3120_interrupt_dma(int irq, void *d)
        if (devpriv->use_double_buffer) {
                struct apci3120_dmabuf *next_dmabuf;
 
-               next_dmabuf = &devpriv->dmabuf[1 - devpriv->ui_DmaActualBuffer];
+               next_dmabuf = &devpriv->dmabuf[!devpriv->cur_dmabuf];
 
                /* start DMA on next buffer */
                apci3120_init_dma(dev, next_dmabuf);
@@ -383,7 +383,7 @@ static void apci3120_interrupt_dma(int irq, void *d)
 
        if (devpriv->use_double_buffer) {
                /* switch dma buffers for next interrupt */
-               devpriv->ui_DmaActualBuffer = 1 - devpriv->ui_DmaActualBuffer;
+               devpriv->cur_dmabuf = !devpriv->cur_dmabuf;
        } else {
                /* restart DMA if is not using double buffering */
                apci3120_init_dma(dev, dmabuf);
index f768845597527fe91073469f74db0af3b1d347e2..eec0cdba12063f910716de153118c1dc1d4e9b6c 100644 (file)
@@ -131,7 +131,7 @@ struct apci3120_private {
        unsigned int osc_base;
        unsigned int use_dma:1;
        unsigned int use_double_buffer:1;
-       unsigned int ui_DmaActualBuffer;
+       unsigned int cur_dmabuf:1;
        struct apci3120_dmabuf dmabuf[2];
        unsigned char do_bits;
        unsigned char timer_mode;