From patchwork Tue Dec 17 11:30:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181867 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp5566798och; Tue, 17 Dec 2019 03:30:21 -0800 (PST) X-Google-Smtp-Source: APXvYqwnXjb0ES5A+bE5da5+LxPpyPoQ2rc/Qf0QzXz1NzJliJSEOFYl2CKzVttfEJCMlHpUh62o X-Received: by 2002:a05:6830:2006:: with SMTP id e6mr35550612otp.367.1576582221319; Tue, 17 Dec 2019 03:30:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576582221; cv=none; d=google.com; s=arc-20160816; b=dCz3U+PdkFt713U/DkoGaqWDCzOmxT72V4FqQ72XhMlktwXvbQSY4tqdVaubotnkxM lLt1rkx9MjmCpElDakI0YT23kRJVJbWf0ZXHw2kvqt7isEfWJarOKR1xUkTEk6XvI7Zy VdB+ACx6PNCxDiy4MDh72fHYtsUKKpsE8JWimyNgMUfaeG2QYT+moySPCXyHt8RcflUe h7pRdFAt/0z4QLXnW2vTtN+SImQ/pXaVyuUL/A4HamljVtdvxRauPgZrTDF0PHlabmmd SLaJZnajh54ZD/EA1UBuQlNlOi9Kw/UGwXjmPBJ5j/Ie7yVnxkWxyRNfQe/7tZ5SR+9k eAUw== 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=I6uBdsrY/2oZcGPMJ6rsk+7vnTuyLMExdt+D7cn9oyE=; b=t8e6aUXkeMV7fSD4xySqQDap0Ircdm10Ish809rL4EzccRvIyv4y9mvaOj2TT32RPI xygSIQAG6L64TyWUtsW1efkpdhXEYyP0f0ERyt5Hhe/HQJWkCyKVElehrceWRj0FO28n pJ0ajgIFCk+oZTwAYUGSAJssM9M7nubki6ZNdjqGg2sydiAl4xrSXu+b3nDmaNNqA1Og VdKQbkxapl8t9DrKJx8X3oA10/o/sJOnL9o5iFMIB7YimvePIDk6HK9r09RbvKJH1SCw 54FRJp6A9wJ3+KscWGWkxwqGobRFPazRqDK1DwttEEwaUXQjGCfNxV8bswGvuR0HUEtJ q66w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=IV9C7jHo; 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 g26si14501793otn.180.2019.12.17.03.30.20; Tue, 17 Dec 2019 03:30:21 -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=IV9C7jHo; 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 S1726623AbfLQLaU (ORCPT + 5 others); Tue, 17 Dec 2019 06:30:20 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:51708 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726164AbfLQLaU (ORCPT ); Tue, 17 Dec 2019 06:30:20 -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 xBHBUITJ035295; Tue, 17 Dec 2019 05:30:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576582218; bh=I6uBdsrY/2oZcGPMJ6rsk+7vnTuyLMExdt+D7cn9oyE=; h=From:To:CC:Subject:Date; b=IV9C7jHoQQHIg+Ewt1Bf+OBBSksMAKifmm6TnPzi39moukq9KG5jz0OAqOXuIP+pB Uugod7jRtN/tGpUvdEW5fYmy9Pa/zJmo56fGiKbEmc51QeO/Um+vTFnvKLIq1l6K33 MAQDb+/0IGi1Ty6J6mdzgVi3fSp8VTSBEuv2ZsLE= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBHBUIJO128564; Tue, 17 Dec 2019 05:30:18 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) 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:30:18 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE103.ent.ti.com (10.64.6.24) 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:30:18 -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 xBHBUG0m088402; Tue, 17 Dec 2019 05:30:16 -0600 From: Peter Ujfalusi To: CC: , , Subject: [PATCH] mmc: sh_mmcif: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 13:30:31 +0200 Message-ID: <20191217113031.31847-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 if needed. Signed-off-by: Peter Ujfalusi --- drivers/mmc/host/sh_mmcif.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 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/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 98c575de43c7..414b5bdb4c83 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -432,8 +432,12 @@ static void sh_mmcif_request_dma(struct sh_mmcif_host *host) host->chan_rx = sh_mmcif_request_dma_pdata(host, pdata->slave_id_rx); } else { - host->chan_tx = dma_request_slave_channel(dev, "tx"); - host->chan_rx = dma_request_slave_channel(dev, "rx"); + host->chan_tx = dma_request_chan(dev, "tx"); + if (IS_ERR(host->chan_tx)) + host->chan_tx = NULL; + host->chan_rx = dma_request_chan(dev, "rx"); + if (IS_ERR(host->chan_rx)) + host->chan_rx = NULL; } dev_dbg(dev, "%s: got channel TX %p RX %p\n", __func__, host->chan_tx, host->chan_rx);