From patchwork Tue Dec 17 07:33:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181834 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5396051ile; Mon, 16 Dec 2019 23:33:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwsh67armcDa31emULrOMQub7GkehE72I3wWHzG8qdm5S2aEKDaWmChoB8lAGkZABNomJz2 X-Received: by 2002:a9d:53c2:: with SMTP id i2mr34424695oth.43.1576567996208; Mon, 16 Dec 2019 23:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576567996; cv=none; d=google.com; s=arc-20160816; b=gVxVGfSdm2KrILzWBoT0E7DeFIKjAqGQfUOTbU2gvqf78vf2du1hfeCkFtsGuEUmtt ZwmUg3m9e6jaonRhyKa9vAd7VruN6cRri78TX70RWyaooo9Wx4fe/3zA2i2zUSrloCUs MwvBkP4erPEah2Rbc1UXj03uzhdLJ+XZsNbZFUhqfOqwdzSP6jGXWDe5xVgERlUy+Eia REax7sjPcUfUXjhqkHFtDzd8DAKm15WwMmtpQcgLkTQ+QXBo9BqPM2UZc7ASr7pdekAJ 9gABMVrlkEA57sEwSCqA8CpVy8M05B1QK13vlBay/H8alM38Xi+YsM6yaPZnE0SVZDp6 J1ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=eSQ2dhkByo6FgeZrI6vTF+HFoYKLR2l6HPaoPta+Z3I=; b=AVF+YeCcYQyEwDd5Qw/HmvGV3tUodhxZcm/19I/LP1/eiN9HvNM/ZRz8hP4UyJ7NRw uprFAMSZnWesFqbNcjtwwDw8Y8W7A5pMoznZc7knw6q4GRiLGKaD2XHyK8oIWrQvYmEf xtHkY/uM7MedUZrv80sfsLWxlY/T/y0svD+CzMo/f5w/IRZc++aqzGroNiq0RVpTCrWF oC0Kt1/KBaQgeRP2f8zsGgljuisyBokdttnS0EKS5QOnUaKxjHsCijw4vZANoXW5jGc5 Uiffq3Yx2BjpZlUABDgFc/5pfPfSmIxSgf7SNgVeufus9YJclkSCzD0HklrLmdowzqmQ D6Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Q4wIdNlR; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i205si12224347oih.257.2019.12.16.23.33.16; Mon, 16 Dec 2019 23:33:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Q4wIdNlR; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726801AbfLQHdP (ORCPT + 3 others); Tue, 17 Dec 2019 02:33:15 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:53160 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbfLQHdP (ORCPT ); Tue, 17 Dec 2019 02:33:15 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBH7WqUl004981; Tue, 17 Dec 2019 01:32:52 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576567972; bh=eSQ2dhkByo6FgeZrI6vTF+HFoYKLR2l6HPaoPta+Z3I=; h=From:To:CC:Subject:Date; b=Q4wIdNlR+Ewu19kOFNosgMC1SS0Y3tRYcj6Hu/+9kipLxunNJVii3JMZSSeX8KJIt CouoVv1wMm96V786m6idYYUoeLxv7j+ZlDWiL0ItcYvF9LKlt5ocFjVgzDL9YgsWzY tzRiDAh6tnWbXPRn+tcds7pygefMmdnAk0CBKRI4= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBH7WqwJ128240; Tue, 17 Dec 2019 01:32:52 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Tue, 17 Dec 2019 01:32:51 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Tue, 17 Dec 2019 01:32:51 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBH7WnRn081690; Tue, 17 Dec 2019 01:32:50 -0600 From: Peter Ujfalusi To: , CC: , , Subject: [PATCH] crypto: img-hash - Use dma_request_chan instead dma_request_slave_channel Date: Tue, 17 Dec 2019 09:33:05 +0200 Message-ID: <20191217073305.20492-1-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org dma_request_slave_channel() is a wrapper on top of dma_request_chan() eating up the error code. By using dma_request_chan() directly the driver can support deferred probing against DMA. Signed-off-by: Peter Ujfalusi --- drivers/crypto/img-hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/crypto/img-hash.c b/drivers/crypto/img-hash.c index fe4cc8babe1c..25d5227f74a1 100644 --- a/drivers/crypto/img-hash.c +++ b/drivers/crypto/img-hash.c @@ -332,10 +332,10 @@ static int img_hash_dma_init(struct img_hash_dev *hdev) struct dma_slave_config dma_conf; int err = -EINVAL; - hdev->dma_lch = dma_request_slave_channel(hdev->dev, "tx"); - if (!hdev->dma_lch) { + hdev->dma_lch = dma_request_chan(hdev->dev, "tx"); + if (IS_ERR(hdev->dma_lch)) { dev_err(hdev->dev, "Couldn't acquire a slave DMA channel.\n"); - return -EBUSY; + return PTR_ERR(hdev->dma_lch); } dma_conf.direction = DMA_MEM_TO_DEV; dma_conf.dst_addr = hdev->bus_addr;