From patchwork Tue Jun 25 08:54:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 2775421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C0BBF9F3A0 for ; Tue, 25 Jun 2013 08:59:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8F893201C7 for ; Tue, 25 Jun 2013 08:59:11 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3366C201C0 for ; Tue, 25 Jun 2013 08:59:10 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrP3g-0006FO-85; Tue, 25 Jun 2013 08:57:05 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrP3B-0008M6-F4; Tue, 25 Jun 2013 08:56:33 +0000 Received: from mail-ee0-x22e.google.com ([2a00:1450:4013:c00::22e]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UrP2q-0008Id-Ng for linux-arm-kernel@lists.infradead.org; Tue, 25 Jun 2013 08:56:14 +0000 Received: by mail-ee0-f46.google.com with SMTP id d41so6413336eek.19 for ; Tue, 25 Jun 2013 01:55:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=o4z1eWKUo0KSYqP6t/svh5l+y19FItnNmxB/Kr9lFYU=; b=l1RxlMcEjwlG9z3VFOJcwpTOV6AT8IAe0LCHDAzdW09FPksRp2tUwcARu/h1UNQ9Qq zA9qfC8WxxEq6kOqZ7s5Bi5Ci6Xu//4UIQcqZMu5vvLZybFOdapRmJXibDLaAlvUtn/t UFXZhEqA3D3PM2IZ9pWFSGaK0LPEpBcgAlqDxsazH3MFabfGEZOY0yvI4Map5eiVu3eI sBTJt2wV1/8GzC7vJznTxsHto/5wH+I81EnSImoa8LsPcETbxqLZ8d+k241KK1w+X11Q ULb5qW+amgMwDQnGeWQW7FbFG9wLatFGcgF8E6g6s3LYigi/r8Wzh/NyRajM7IFfasVu 2e4Q== X-Received: by 10.15.67.140 with SMTP id u12mr28518724eex.90.1372150550854; Tue, 25 Jun 2013 01:55:50 -0700 (PDT) Received: from localhost (host156-187-dynamic.52-82-r.retail.telecomitalia.it. [82.52.187.156]) by mx.google.com with ESMTPSA id b7sm34320712eef.16.2013.06.25.01.55.48 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Jun 2013 01:55:50 -0700 (PDT) From: Fabio Baltieri To: Herbert Xu Subject: [PATCH 4/6] crypto: ux500: use dmaengine_device_control API Date: Tue, 25 Jun 2013 10:54:47 +0200 Message-Id: <1372150489-25594-5-git-send-email-fabio.baltieri@linaro.org> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1372150489-25594-1-git-send-email-fabio.baltieri@linaro.org> References: <1372150489-25594-1-git-send-email-fabio.baltieri@linaro.org> X-Gm-Message-State: ALoCoQkNyCtPI25PomvBSW7Zgaici9fu2LELyJEUcJuwqGUF0hQ5iaXo91jZQynyrB8+TDd6NVuZ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130625_045612_942467_28A7D6E7 X-CRM114-Status: UNSURE ( 9.61 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: Fabio Baltieri , Linus Walleij , linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, Lee Jones , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use dmaengine_device_control inline function instead of going through the structures manually. Signed-off-by: Fabio Baltieri --- drivers/crypto/ux500/cryp/cryp_core.c | 4 ++-- drivers/crypto/ux500/hash/hash_core.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c index b675bbd..1957c18 100644 --- a/drivers/crypto/ux500/cryp/cryp_core.c +++ b/drivers/crypto/ux500/cryp/cryp_core.c @@ -607,12 +607,12 @@ static void cryp_dma_done(struct cryp_ctx *ctx) dev_dbg(ctx->device->dev, "[%s]: ", __func__); chan = ctx->device->dma.chan_mem2cryp; - chan->device->device_control(chan, DMA_TERMINATE_ALL, 0); + dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0); dma_unmap_sg(chan->device->dev, ctx->device->dma.sg_src, ctx->device->dma.sg_src_len, DMA_TO_DEVICE); chan = ctx->device->dma.chan_cryp2mem; - chan->device->device_control(chan, DMA_TERMINATE_ALL, 0); + dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0); dma_unmap_sg(chan->device->dev, ctx->device->dma.sg_dst, ctx->device->dma.sg_dst_len, DMA_FROM_DEVICE); } diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index dbf7b63..8c2817804 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c @@ -203,7 +203,7 @@ static void hash_dma_done(struct hash_ctx *ctx) struct dma_chan *chan; chan = ctx->device->dma.chan_mem2hash; - chan->device->device_control(chan, DMA_TERMINATE_ALL, 0); + dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0); dma_unmap_sg(chan->device->dev, ctx->device->dma.sg, ctx->device->dma.sg_len, DMA_TO_DEVICE);