From patchwork Tue Dec 17 11:26:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181861 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp5563135och; Tue, 17 Dec 2019 03:26:48 -0800 (PST) X-Google-Smtp-Source: APXvYqzwkeQvmj5r7jEXmXebqmbN7K6S3Q7G0F2pbBR+2CYWw/Z+8aZiWQlEyal3BVxW541OxEEO X-Received: by 2002:a05:6830:1651:: with SMTP id h17mr7651274otr.167.1576582008085; Tue, 17 Dec 2019 03:26:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576582008; cv=none; d=google.com; s=arc-20160816; b=oZS2tLGTzoWlgJMfNGX6a/0l7nGkC97ARvRd+Kous8WAkU2zwJzsAXSvxK+04s5mOT VqVhEOIhtpFJ3JzkDJ0lOfI1F5nk0gV3gqLz1iLMidKwcCsR2jSULG6YFwp+FN9bp5LO X0hbnh/2rQosCW78iLUg4lHosz97IRTusiKY5YLqBH0YUL6IDa8ePMkuxhr1n9mMGJCK JhxcPse/g9kzA41uYhHOzOWHtxo2MxwO6I8dCNpGiDW9u3cYNqGaMARm4poD9gMuzhZN jMWkX1N7crWle5rpx5XAtsONXMHN790LqFrt2cnEK0E1IBiixFG3o3BMHr83v7itJpC4 tPhg== 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=UcXYwCK20UsHhTPz8x7aYSI30oLjPmwYTl2MyT+hcGE=; b=fORKIbpViz1N/HVRKLO0HfDm9H4M0o6lV8T0gL2wyCny383ouXTu/YI72C3h/T6A3Y Q74D+2z3UWs69xLbAB6oGN+xi9mIqzshuLNFluMcJTfkP2LZm3ssjQBa3fbKoMom7Hh7 8K7djZiyH/xZUIhjNjAbYveCbwxHBPZMbpoZ9MB8k3NXtATb1QzLuJv18SyioIVXT5UJ YfinNwUEldIEgUqCF1n0XRDpgU+qtKrSrlgmwB+YbapRSZadikAlUFPAVZu3l59UPShK 1EsBAb8r6qeIrV4QMwUu7nL/Li1Wyo2P7y86B9ACAATxrX3nId7YW317jYftnY8PzDbM Q1nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=WnSGRRC0; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 t130si12175568oih.37.2019.12.17.03.26.47; Tue, 17 Dec 2019 03:26:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-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=WnSGRRC0; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 S1727151AbfLQL0r (ORCPT + 5 others); Tue, 17 Dec 2019 06:26:47 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:53884 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726487AbfLQL0r (ORCPT ); Tue, 17 Dec 2019 06:26:47 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBHBQh7t095669; Tue, 17 Dec 2019 05:26:43 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576582003; bh=UcXYwCK20UsHhTPz8x7aYSI30oLjPmwYTl2MyT+hcGE=; h=From:To:CC:Subject:Date; b=WnSGRRC0w7Smlfn1eNmhbWeevy4dBEcqHLZznmKghrdmTZza8ERysPrvPnOXkBz6q JRr/ff/Vl+C9g/d66j6+IJDCYui1N6Ps1cS2HxWFpF33DkbpD9seLxx1b7DQ1SPoWA PjgUIUFM1uOLnVtu7CMJuZ8ZNl7ozSk3MIuweCLA= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBHBQh2S066437 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2019 05:26:43 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) 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; Tue, 17 Dec 2019 05:26:42 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE111.ent.ti.com (157.170.170.22) 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:26:42 -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 xBHBQetu104681; Tue, 17 Dec 2019 05:26:41 -0600 From: Peter Ujfalusi To: , CC: , , Subject: [PATCH] mmc: dw_mmc: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 13:26:56 +0200 Message-ID: <20191217112656.30860-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-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@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/mmc/host/dw_mmc.c | 8 +++++--- 1 file changed, 5 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/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index fc9d4d000f97..bc5278ab5707 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -833,12 +833,14 @@ static int dw_mci_edmac_init(struct dw_mci *host) if (!host->dms) return -ENOMEM; - host->dms->ch = dma_request_slave_channel(host->dev, "rx-tx"); - if (!host->dms->ch) { + host->dms->ch = dma_request_chan(host->dev, "rx-tx"); + if (IS_ERR(host->dms->ch)) { + int ret = PTR_ERR(host->dms->ch); + dev_err(host->dev, "Failed to get external DMA channel.\n"); kfree(host->dms); host->dms = NULL; - return -ENXIO; + return ret; } return 0;