From patchwork Tue Dec 17 11:30:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181866 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp5566311och; Tue, 17 Dec 2019 03:29:55 -0800 (PST) X-Google-Smtp-Source: APXvYqxAbfAJgGhq9s4oOJcgR+MYkQrRhHstim2QoYwLytdss0C8PB4QrOod4uw8LrJX66EgFjGo X-Received: by 2002:a9d:3425:: with SMTP id v34mr35732308otb.142.1576582195396; Tue, 17 Dec 2019 03:29:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576582195; cv=none; d=google.com; s=arc-20160816; b=INMFOnEUvR1SbinqHQJqOwIMIWoukWRLrmv875ZjYKz240RgY0r3NFdH6P6nZ+yzGG v5TUaP9DeazrHE1QtSsckK9eimIVeQ56II0aP2fmG6UYNBdWge4XA+SqrlKP2/scH7G0 DwWXDHs/pDJ3MBSefxoRrCN7i8tnbNg7W8qv0ECB3LNozoo8m8rlt/rXOXsgW6M/ZonE 5agk4k4f54/gucBigk4CsAz9rs2nWlMfxgtlxcqZbYJA/tc/cjFBrCi//oEh9DNlu4ov DYblypRgyuFHP+XZkthSk+JsF13EcnDfJrdckMgX5LWpSBoRuIewGsWsDSO52sYBt8eE wgcQ== 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=W8foQHg2N98HNpKe6MWnzh4yOZcYkjym+oBf1iZB36U=; b=mpRkg9yALXGEv5h/aeS3ePHfZWIlQhBDIKGR5t5gLuLRWntaz7g2jOEcfhkoXvYhsn vT6D57vpX9bruN+/fGLg28Erb0qb+2Hed065K/jy+2+Urx/M60S73thBTOQckYxQFX9Q qoer3BMZUoiv3MT0Z7lJVJ8w7eAFzq86iKTlBGi2LpgHR5zwKsT/28xzWyNfW2y8mO2A rh0+Eev6cfhSlNsVFhyFXLKP0MliRRkZ+hYNj9uREPGdyPOaTnBwdXa9+7sZoOMYd82c +VjWTU1yezLjMfn15ywGotzigv/06OgKrpKCFKugmJ1M5atL86NsOl0MAY0uhxy/dB6j KT7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=h2xG2Gwi; 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 b10si11464036oib.205.2019.12.17.03.29.55; Tue, 17 Dec 2019 03:29:55 -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=h2xG2Gwi; 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 S1726496AbfLQL3y (ORCPT + 5 others); Tue, 17 Dec 2019 06:29:54 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:39608 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbfLQL3y (ORCPT ); Tue, 17 Dec 2019 06:29:54 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBHBTqdr071453; Tue, 17 Dec 2019 05:29:52 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576582192; bh=W8foQHg2N98HNpKe6MWnzh4yOZcYkjym+oBf1iZB36U=; h=From:To:CC:Subject:Date; b=h2xG2GwiAe0wBy+XNNFuPRybIEq5++un7EFuMkOmeAi3k1qvNPDCGsQjEYkVGNLJs tlW/O62DVP4jmok+WQCLAqW/+zNO2m7qYe7a98iIyT1iCTDFm+i2DFI54Gw+mV6AM+ C/XWJOPVKvVLwjkSscnSD31zlVuJ2An6x+Nc4U9E= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBHBTqqd021063 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2019 05:29:52 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE101.ent.ti.com (10.64.6.22) 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:29:51 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE111.ent.ti.com (10.64.6.32) 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:29:51 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBHBTnII086939; Tue, 17 Dec 2019 05:29:50 -0600 From: Peter Ujfalusi To: CC: , , Subject: [PATCH] mmc: pxamci: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 13:30:04 +0200 Message-ID: <20191217113004.31688-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/pxamci.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 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/pxamci.c b/drivers/mmc/host/pxamci.c index 024acc1b0a2e..cf36e4e05f46 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c @@ -710,17 +710,19 @@ static int pxamci_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mmc); - host->dma_chan_rx = dma_request_slave_channel(dev, "rx"); - if (host->dma_chan_rx == NULL) { + host->dma_chan_rx = dma_request_chan(dev, "rx"); + if (IS_ERR(host->dma_chan_rx)) { dev_err(dev, "unable to request rx dma channel\n"); - ret = -ENODEV; + ret = PTR_ERR(host->dma_chan_rx); + host->dma_chan_rx = NULL; goto out; } - host->dma_chan_tx = dma_request_slave_channel(dev, "tx"); - if (host->dma_chan_tx == NULL) { + host->dma_chan_tx = dma_request_chan(dev, "tx"); + if (IS_ERR(host->dma_chan_tx)) { dev_err(dev, "unable to request tx dma channel\n"); - ret = -ENODEV; + ret = PTR_ERR(host->dma_chan_tx); + host->dma_chan_tx = NULL; goto out; }