From patchwork Tue Dec 17 07:35:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181835 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5397578ile; Mon, 16 Dec 2019 23:35:12 -0800 (PST) X-Google-Smtp-Source: APXvYqzQaW7tGGu7Sqgcb32tFLfe3XdzVXpdaZNzLlV2flxqVkNYH4SpJkBYhkp/udIiKQ82g/XC X-Received: by 2002:a05:6830:1e37:: with SMTP id t23mr36874997otr.16.1576568111925; Mon, 16 Dec 2019 23:35:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576568111; cv=none; d=google.com; s=arc-20160816; b=f4WqAFENLI7OWfnSxy30tNIwhhi5YEuUnNhhiXL+FT6iRFbIB0L9KJhNxRs2oKmQ2N OlfLOXC5LxENXLnZpY6rRXDSTjjfYX+NjLshAHdezvk5GGcvomifJsAY5vkY5mqkwZ+d fPa8I/4cnexl8SIh+12ImiChXmcDocLRSej9ufAuPlqH0ENtmmmaU+7h8tjAfK8L30g4 3Sgio/jyIVrhtgMU1Ifgcqa8PAwrvK9iZ1cfLjavV14FkybAEvHH5FXdIUcqhwDzOXB5 BgZ+Wlcb+SRJHNGtY9IBgA5HJr2PBWX63gI2AgHoSIcNXmNGN1VYiEAhnWL7WhdSLOrO 6Bbw== 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=0FwLBx8XfykMdjHah7/EtEeo+R5IsHmwRrAh/bmn7U4=; b=jY5PqtGuJfbk6vuUjePD4s4f+us7DDX3k2U7XHrt9zxMdJEUOBxQce8IErr1UZjz8w vDXNdl2eM4Ta4zsWgrRUU1wkszo6Pk8rvy2Cu/wSQRFFWW/QtX3Kn6Owmr0ZEtK4uC2e HUYuTpHUL6YAIlW0jvxztOaRD0h/jo2Rxlj/AyCbLN5pPdLAeetwoD/RZLXHQ7Ph2mNw g2zEJDEldy1SYUXBda0J2t3wbZDhUp5OA5qKXkJpb9zDbRbt72cEs8JJNyou/TfhBjId UkEeOVbD2b2fu0SfH4QFPWMCM/qAMAdOUr27ATQW6MaMDpucP8y1F3ywc9s9u9RTF2JW hKNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UUA+YQja; 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 i2si11091633otc.130.2019.12.16.23.35.11; Mon, 16 Dec 2019 23:35:11 -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=UUA+YQja; 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 S1726387AbfLQHfL (ORCPT + 3 others); Tue, 17 Dec 2019 02:35:11 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:51448 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbfLQHfL (ORCPT ); Tue, 17 Dec 2019 02:35:11 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBH7YsuK075971; Tue, 17 Dec 2019 01:34:54 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576568094; bh=0FwLBx8XfykMdjHah7/EtEeo+R5IsHmwRrAh/bmn7U4=; h=From:To:CC:Subject:Date; b=UUA+YQjalhxvPMh5NdESQCFfzVRQt2XhwqSL3G3PxYYsp3oW28ySWeHVVVoE/lGba 3bd/pHENNNi++tbecyc6j1GI45euxvXFSitWivdhI+x8nPRzhte0iRF0btn3SAdeQ1 S2rWKAewPtsdaowSrgNsac+nJie8ugQeaU8rUIjI= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBH7YrYM001109; Tue, 17 Dec 2019 01:34:54 -0600 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE105.ent.ti.com (10.64.6.26) 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:34:53 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE104.ent.ti.com (10.64.6.25) 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:34:53 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBH7YoW6058420; Tue, 17 Dec 2019 01:34:51 -0600 From: Peter Ujfalusi To: , , , CC: , , , , Subject: [PATCH] crypto: stm32/hash - Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 09:35:06 +0200 Message-ID: <20191217073506.20861-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/stm32/stm32-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/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c index cfc8e0e37bee..167b80eec437 100644 --- a/drivers/crypto/stm32/stm32-hash.c +++ b/drivers/crypto/stm32/stm32-hash.c @@ -518,10 +518,10 @@ static int stm32_hash_dma_init(struct stm32_hash_dev *hdev) dma_conf.dst_maxburst = hdev->dma_maxburst; dma_conf.device_fc = false; - hdev->dma_lch = dma_request_slave_channel(hdev->dev, "in"); - if (!hdev->dma_lch) { + hdev->dma_lch = dma_request_chan(hdev->dev, "in"); + 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); } err = dmaengine_slave_config(hdev->dma_lch, &dma_conf);