From patchwork Tue Jun 25 08:54:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Baltieri X-Patchwork-Id: 18103 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f200.google.com (mail-gh0-f200.google.com [209.85.160.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DE0AE25E10 for ; Tue, 25 Jun 2013 08:56:27 +0000 (UTC) Received: by mail-gh0-f200.google.com with SMTP id 10sf12662258ghy.7 for ; Tue, 25 Jun 2013 01:56:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=ISQLm7XOeLhDNg8gX0trxEfeoENjLvcdfTuVy0jDwwg=; b=K7LJ0slnNb+FDfg0B9eeAc19JznM0you1mCPe1Zdu/oduWfZoQrU/pON0EO7AGPHQ9 itsBnOBneQibbs+dzjW7nATV+XXhD7b/5MMu+qHwIeQE811ZO/KJx31dflJ015KjFl4e 3gGd+nFQqbUhiCff60VXSTyqaD1iVRoJ7wSEdmBJAWzkabxsLshTXOkF5ranP1+3nOSH wG3O/iNAC0DA+Kid1eZ1pauQAyAfwnI5gawVVU8QIkR/KuGbFWyBIeHmKYO0JPZ6VsmM rN2gfox33Hcr7dxlvxX79wZ6qfS3BwaC2f2pvcvh1b3t+XeXETUbEZKCXjctPtU55SQj rW+A== X-Received: by 10.224.42.141 with SMTP id s13mr29068781qae.3.1372150587261; Tue, 25 Jun 2013 01:56:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.107.66 with SMTP id ha2ls2385778qeb.56.gmail; Tue, 25 Jun 2013 01:56:27 -0700 (PDT) X-Received: by 10.221.4.138 with SMTP id oc10mr13495764vcb.26.1372150587019; Tue, 25 Jun 2013 01:56:27 -0700 (PDT) Received: from mail-vc0-x229.google.com (mail-vc0-x229.google.com [2607:f8b0:400c:c03::229]) by mx.google.com with ESMTPS id 6si5993307vca.12.2013.06.25.01.56.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Jun 2013 01:56:27 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c03::229; Received: by mail-vc0-f169.google.com with SMTP id ia10so645463vcb.28 for ; Tue, 25 Jun 2013 01:56:26 -0700 (PDT) X-Received: by 10.220.53.7 with SMTP id k7mr13102053vcg.52.1372150586928; Tue, 25 Jun 2013 01:56:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.58.165.8 with SMTP id yu8csp58990veb; Tue, 25 Jun 2013 01:56:25 -0700 (PDT) X-Received: by 10.15.36.72 with SMTP id h48mr28836901eev.33.1372150554817; Tue, 25 Jun 2013 01:55:54 -0700 (PDT) Received: from mail-ee0-x233.google.com (mail-ee0-x233.google.com [2a00:1450:4013:c00::233]) by mx.google.com with ESMTPS id b5si14590592eew.310.2013.06.25.01.55.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Jun 2013 01:55:54 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:4013:c00::233 is neither permitted nor denied by best guess record for domain of fabio.baltieri@linaro.org) client-ip=2a00:1450:4013:c00::233; Received: by mail-ee0-f51.google.com with SMTP id e52so6555892eek.24 for ; Tue, 25 Jun 2013 01:55:54 -0700 (PDT) X-Received: by 10.15.10.132 with SMTP id g4mr9413329eet.38.1372150554314; Tue, 25 Jun 2013 01:55:54 -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 l42sm34308285eeo.14.2013.06.25.01.55.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Jun 2013 01:55:53 -0700 (PDT) From: Fabio Baltieri To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Linus Walleij , Lee Jones , Fabio Baltieri Subject: [PATCH 5/6] crypto: ux500: use dmaengine_prep_slave_sg API Date: Tue, 25 Jun 2013 10:54:48 +0200 Message-Id: <1372150489-25594-6-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: ALoCoQn92t/zN+fxDFhpYKnaawyD7YM1QOA5eMRWr7oMu3bAo73UGy3LnRCSiblGcI06B4oHHHmJ X-Original-Sender: fabio.baltieri@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c03::229 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Use dmaengine_prep_slave_sg inline function instead of going through the structures manually. Signed-off-by: Fabio Baltieri --- drivers/crypto/ux500/cryp/cryp_core.c | 20 ++++++++++---------- drivers/crypto/ux500/hash/hash_core.c | 4 ++-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/crypto/ux500/cryp/cryp_core.c b/drivers/crypto/ux500/cryp/cryp_core.c index 1957c18..0cd89df 100644 --- a/drivers/crypto/ux500/cryp/cryp_core.c +++ b/drivers/crypto/ux500/cryp/cryp_core.c @@ -553,10 +553,10 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx, dev_dbg(ctx->device->dev, "[%s]: Setting up DMA for buffer " "(TO_DEVICE)", __func__); - desc = channel->device->device_prep_slave_sg(channel, - ctx->device->dma.sg_src, - ctx->device->dma.sg_src_len, - direction, DMA_CTRL_ACK, NULL); + desc = dmaengine_prep_slave_sg(channel, + ctx->device->dma.sg_src, + ctx->device->dma.sg_src_len, + direction, DMA_CTRL_ACK); break; case DMA_FROM_DEVICE: @@ -577,12 +577,12 @@ static int cryp_set_dma_transfer(struct cryp_ctx *ctx, dev_dbg(ctx->device->dev, "[%s]: Setting up DMA for buffer " "(FROM_DEVICE)", __func__); - desc = channel->device->device_prep_slave_sg(channel, - ctx->device->dma.sg_dst, - ctx->device->dma.sg_dst_len, - direction, - DMA_CTRL_ACK | - DMA_PREP_INTERRUPT, NULL); + desc = dmaengine_prep_slave_sg(channel, + ctx->device->dma.sg_dst, + ctx->device->dma.sg_dst_len, + direction, + DMA_CTRL_ACK | + DMA_PREP_INTERRUPT); desc->callback = cryp_dma_out_callback; desc->callback_param = ctx; diff --git a/drivers/crypto/ux500/hash/hash_core.c b/drivers/crypto/ux500/hash/hash_core.c index 8c2817804..3527777 100644 --- a/drivers/crypto/ux500/hash/hash_core.c +++ b/drivers/crypto/ux500/hash/hash_core.c @@ -180,9 +180,9 @@ static int hash_set_dma_transfer(struct hash_ctx *ctx, struct scatterlist *sg, dev_dbg(ctx->device->dev, "[%s]: Setting up DMA for buffer " "(TO_DEVICE)", __func__); - desc = channel->device->device_prep_slave_sg(channel, + desc = dmaengine_prep_slave_sg(channel, ctx->device->dma.sg, ctx->device->dma.sg_len, - direction, DMA_CTRL_ACK | DMA_PREP_INTERRUPT, NULL); + direction, DMA_CTRL_ACK | DMA_PREP_INTERRUPT); if (!desc) { dev_err(ctx->device->dev, "[%s]: device_prep_slave_sg() failed!", __func__);