From patchwork Tue Dec 17 11:31:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181868 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp5567799och; Tue, 17 Dec 2019 03:31:13 -0800 (PST) X-Google-Smtp-Source: APXvYqxBjt6p3Njc6635U8QaHxnaHdbUw/kLbtloQpDrx26T7kv5XLMMkKkk5bugbMKx3LoQkx9/ X-Received: by 2002:a9d:51c1:: with SMTP id d1mr230599oth.136.1576582272969; Tue, 17 Dec 2019 03:31:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576582272; cv=none; d=google.com; s=arc-20160816; b=JdsS8m5IDnXKPcx9lmT8S0gWOL5P6FmfWSIrphTBqjUkfbcwATRzNaHfYdHCVH+6qa Sk+ihsdad4dR0rbGpiIT/8iaA8KB7NAH88KEzuljk6UXADQDOk2DnCWAlsfDlNoAHo2v zmdFUEGTAsXJ9wBhJctfT/T2o/7BurGBRKqxrgCOea8Nj3RTdPtjm5PkpGTRHyQFJ6IK vQVN8ZH79/h6FGvo0yjXGuYs5TA+qRMEqoSOsMvaKMP4Ot87HVNenwBCTZvWyr2ueyW5 DBSegUXXcAPueCcNrsonxmK575o7EOQ8q76G2a6N+5FkWNTxrCOvLvO9SUP1qpTBF250 AdCA== 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=b1QfEFC8XibZPfBlM2ytgyPKblISPpf+cmA5Wv2xaEQ=; b=PdMpszV7HeZQh5fJd0c8+srT37YTXPeuhJnt3mb9uO+vBQNDpqk09GzI62mXj2MhF3 Mfdx0irghsti2FNWHQcj0ee48tuC72KQHM6AANzAmIq8pvMvVc/85/CXFhr/WoFNYFmm 5e1oRbaMOjULIZeaqiMWTp5uNO/gJzvSvApV6PiWty7EIo5x7meas21mEVB2/iJYR5gC xxBtW0OUwKn9dUekIYdjuw+QkB/Cl+hLLiQe2N2voi/CFEuqHKIobgKZHUSSRRXWlpcJ DYqeTLSfZH59Hdk8Z8YwlI8ir8E3IaRV4hj6HMpIE6VdfN3BahpZ9bueAMS4u+PjVSHF PQJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=M51kOXzh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 g26si14501793otn.180.2019.12.17.03.31.12; Tue, 17 Dec 2019 03:31:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=M51kOXzh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727459AbfLQLbL (ORCPT + 27 others); Tue, 17 Dec 2019 06:31:11 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:39778 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbfLQLbL (ORCPT ); Tue, 17 Dec 2019 06:31:11 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBHBV4ff071868; Tue, 17 Dec 2019 05:31:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576582264; bh=b1QfEFC8XibZPfBlM2ytgyPKblISPpf+cmA5Wv2xaEQ=; h=From:To:CC:Subject:Date; b=M51kOXzhk8PhiQEHN2mA4YaE/jcZjA5n2O1mPDyCsNKUbTC2XmZRkiolbVyTDx8Td uvp/eloJiQl01+gh8S7ndSHKkRUvSw/kqrRt0QZ63aY+q6v9gF0J1/MqZbyZ88HplL Da3DLAqG03fv6bP82mMI9GM/JRIzTghHEi/ljgv0= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBHBV4qk130069; Tue, 17 Dec 2019 05:31:04 -0600 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE101.ent.ti.com (157.170.170.31) 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 05:31:02 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE100.ent.ti.com (157.170.170.30) 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 05:31:02 -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 xBHBUxJR113247; Tue, 17 Dec 2019 05:31:00 -0600 From: Peter Ujfalusi To: , , CC: , , , Subject: [PATCH] mmc: usdhi6rol0: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 13:31:14 +0200 Message-ID: <20191217113114.32085-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 if needed. Signed-off-by: Peter Ujfalusi --- drivers/mmc/host/usdhi6rol0.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c index 969a34e698f2..9a0b1e4e405d 100644 --- a/drivers/mmc/host/usdhi6rol0.c +++ b/drivers/mmc/host/usdhi6rol0.c @@ -676,12 +676,14 @@ static void usdhi6_dma_request(struct usdhi6_host *host, phys_addr_t start) }; int ret; - host->chan_tx = dma_request_slave_channel(mmc_dev(host->mmc), "tx"); + host->chan_tx = dma_request_chan(mmc_dev(host->mmc), "tx"); dev_dbg(mmc_dev(host->mmc), "%s: TX: got channel %p\n", __func__, host->chan_tx); - if (!host->chan_tx) + if (IS_ERR(host->chan_tx)) { + host->chan_tx = NULL; return; + } cfg.direction = DMA_MEM_TO_DEV; cfg.dst_addr = start + USDHI6_SD_BUF0; @@ -691,12 +693,14 @@ static void usdhi6_dma_request(struct usdhi6_host *host, phys_addr_t start) if (ret < 0) goto e_release_tx; - host->chan_rx = dma_request_slave_channel(mmc_dev(host->mmc), "rx"); + host->chan_rx = dma_request_chan(mmc_dev(host->mmc), "rx"); dev_dbg(mmc_dev(host->mmc), "%s: RX: got channel %p\n", __func__, host->chan_rx); - if (!host->chan_rx) + if (IS_ERR(host->chan_rx)) { + host->chan_rx = NULL; goto e_release_tx; + } cfg.direction = DMA_DEV_TO_MEM; cfg.src_addr = cfg.dst_addr;