From patchwork Thu Nov 15 17:20:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1751171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 2FEB0DF2AB for ; Thu, 15 Nov 2012 17:34:46 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TZ3Hl-0001Mx-39; Thu, 15 Nov 2012 17:31:29 +0000 Received: from mail.free-electrons.com ([88.190.12.23]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TZ38H-0003dN-RE for linux-arm-kernel@lists.infradead.org; Thu, 15 Nov 2012 17:21:43 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 7D5BA2E0; Thu, 15 Nov 2012 18:21:38 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham version=3.3.1 Received: from localhost (col31-4-88-188-83-94.fbx.proxad.net [88.188.83.94]) by mail.free-electrons.com (Postfix) with ESMTPSA id B84C7DB; Thu, 15 Nov 2012 18:21:13 +0100 (CET) From: Thomas Petazzoni To: Vinod Koul , Dan Williams , Saeed Bishara , Jason Cooper , Andrew Lunn Subject: [PATCH 20/29] mv_xor: in mv_xor_device, rename 'common' to 'dmadev' Date: Thu, 15 Nov 2012 18:20:25 +0100 Message-Id: <1353000034-30567-21-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1353000034-30567-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1353000034-30567-1-git-send-email-thomas.petazzoni@free-electrons.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20121115_122142_362110_91BEB7FC X-CRM114-Status: GOOD ( 13.13 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Gregory Clement , Lior Amsalem , Sebastian Hesselbarth , linux-arm-kernel@lists.infradead.org, Maen Suleiman X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The mv_xor_device structure embeds a 'struct dma_device', which is named 'common', a not very meaningful name. Rename it to 'dmadev', which will help avoid confusions later as we merge the mv_xor_device and mv_xor_chan structures together. Signed-off-by: Thomas Petazzoni --- drivers/dma/mv_xor.c | 14 +++++++------- drivers/dma/mv_xor.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c index aa6d96c..cbcc441 100644 --- a/drivers/dma/mv_xor.c +++ b/drivers/dma/mv_xor.c @@ -40,7 +40,7 @@ static void mv_xor_issue_pending(struct dma_chan *chan); container_of(tx, struct mv_xor_desc_slot, async_tx) #define mv_chan_to_devp(chan) \ - ((chan)->device->common.dev) + ((chan)->device->dmadev.dev) static void mv_desc_init(struct mv_xor_desc_slot *desc, unsigned long flags) { @@ -923,7 +923,7 @@ static int __devinit mv_xor_memcpy_self_test(struct mv_xor_device *device) ((u8 *) src)[i] = (u8)i; /* Start copy, using first DMA channel */ - dma_chan = container_of(device->common.channels.next, + dma_chan = container_of(device->dmadev.channels.next, struct dma_chan, device_node); if (mv_xor_alloc_chan_resources(dma_chan) < 1) { @@ -1016,7 +1016,7 @@ mv_xor_xor_self_test(struct mv_xor_device *device) memset(page_address(dest), 0, PAGE_SIZE); - dma_chan = container_of(device->common.channels.next, + dma_chan = container_of(device->dmadev.channels.next, struct dma_chan, device_node); if (mv_xor_alloc_chan_resources(dma_chan) < 1) { @@ -1076,14 +1076,14 @@ static int __devexit mv_xor_channel_remove(struct mv_xor_device *device) { struct dma_chan *chan, *_chan; struct mv_xor_chan *mv_chan; - struct device *dev = device->common.dev; + struct device *dev = device->dmadev.dev; - dma_async_device_unregister(&device->common); + dma_async_device_unregister(&device->dmadev); dma_free_coherent(dev, device->pool_size, device->dma_desc_pool_virt, device->dma_desc_pool); - list_for_each_entry_safe(chan, _chan, &device->common.channels, + list_for_each_entry_safe(chan, _chan, &device->dmadev.channels, device_node) { mv_chan = to_mv_xor_chan(chan); list_del(&chan->device_node); @@ -1107,7 +1107,7 @@ mv_xor_channel_add(struct mv_xor_private *msp, if (!adev) return ERR_PTR(-ENOMEM); - dma_dev = &adev->common; + dma_dev = &adev->dmadev; /* allocate coherent memory for hardware descriptors * note: writecombine gives slightly better performance, but diff --git a/drivers/dma/mv_xor.h b/drivers/dma/mv_xor.h index ad18f64..84255e6 100644 --- a/drivers/dma/mv_xor.h +++ b/drivers/dma/mv_xor.h @@ -73,7 +73,7 @@ struct mv_xor_device { dma_addr_t dma_desc_pool; void *dma_desc_pool_virt; size_t pool_size; - struct dma_device common; + struct dma_device dmadev; struct mv_xor_private *shared; };