staging: comedi: mite: rename mite_ring member 'descriptors_dma_addr'
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 2 May 2016 17:11:37 +0000 (10:11 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 May 2016 21:11:15 +0000 (14:11 -0700)
Rename this member of struct mite_ring to 'dma_addr' to help shorten the
long lines.

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/mite.c
drivers/staging/comedi/drivers/mite.h

index c6165871ec62819def92c660388ff983a2ae6f4a..cf1157e9837b0076bbea6a11a206050c68863c56 100644 (file)
@@ -369,7 +369,7 @@ struct mite_ring *mite_alloc_ring(struct mite *mite)
        }
        ring->n_links = 0;
        ring->descriptors = NULL;
-       ring->descriptors_dma_addr = 0;
+       ring->dma_addr = 0;
        return ring;
 };
 EXPORT_SYMBOL_GPL(mite_alloc_ring);
@@ -382,7 +382,7 @@ void mite_free_ring(struct mite_ring *ring)
                                          ring->n_links *
                                          sizeof(struct mite_dma_desc),
                                          ring->descriptors,
-                                         ring->descriptors_dma_addr);
+                                         ring->dma_addr);
                }
                put_device(ring->hw_dev);
                kfree(ring);
@@ -478,10 +478,10 @@ int mite_buf_change(struct mite_ring *ring,
                                  ring->n_links *
                                  sizeof(struct mite_dma_desc),
                                  ring->descriptors,
-                                 ring->descriptors_dma_addr);
+                                 ring->dma_addr);
        }
        ring->descriptors = NULL;
-       ring->descriptors_dma_addr = 0;
+       ring->dma_addr = 0;
        ring->n_links = 0;
 
        if (async->prealloc_bufsz == 0)
@@ -492,7 +492,7 @@ int mite_buf_change(struct mite_ring *ring,
        ring->descriptors =
            dma_alloc_coherent(ring->hw_dev,
                               n_links * sizeof(struct mite_dma_desc),
-                              &ring->descriptors_dma_addr, GFP_KERNEL);
+                              &ring->dma_addr, GFP_KERNEL);
        if (!ring->descriptors) {
                dev_err(s->device->class_dev,
                        "mite: ring buffer allocation failed\n");
@@ -535,7 +535,7 @@ int mite_init_ring_descriptors(struct mite_ring *ring,
                ring->descriptors[i].addr =
                    cpu_to_le32(async->buf_map->page_list[i].dma_addr);
                ring->descriptors[i].next =
-                   cpu_to_le32(ring->descriptors_dma_addr +
+                   cpu_to_le32(ring->dma_addr +
                                (i + 1) * sizeof(struct mite_dma_desc));
        }
 
@@ -550,7 +550,7 @@ int mite_init_ring_descriptors(struct mite_ring *ring,
        }
 
        /* Assign the last link->next to point back to the head of the list. */
-       ring->descriptors[i - 1].next = cpu_to_le32(ring->descriptors_dma_addr);
+       ring->descriptors[i - 1].next = cpu_to_le32(ring->dma_addr);
 
        /*
         * barrier is meant to insure that all the writes to the dma descriptors
@@ -641,7 +641,7 @@ void mite_prep_dma(struct mite_channel *mite_chan,
        writel(lkcr, mite->mite_io_addr + MITE_LKCR(mite_chan->channel));
 
        /* starting address for link chaining */
-       writel(mite_chan->ring->descriptors_dma_addr,
+       writel(mite_chan->ring->dma_addr,
               mite->mite_io_addr + MITE_LKAR(mite_chan->channel));
 }
 EXPORT_SYMBOL_GPL(mite_prep_dma);
index 5317d157e1f92ced7af46e69beb5a130c794f4eb..cd0883c6b62e6eeef804a1e72ad14e727d726029 100644 (file)
@@ -39,7 +39,7 @@ struct mite_ring {
        struct device *hw_dev;
        unsigned int n_links;
        struct mite_dma_desc *descriptors;
-       dma_addr_t descriptors_dma_addr;
+       dma_addr_t dma_addr;
 };
 
 struct mite_channel {