From patchwork Tue Dec 17 07:40:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181838 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5401597ile; Mon, 16 Dec 2019 23:40:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxsKNA3KYlD4fT5Bjwg9mI2MXe0WljHTAf1sHPZQhIUO/xSlOUIiP3TDC5Ut0xoVu5DaaPH X-Received: by 2002:a9d:61c4:: with SMTP id h4mr38130159otk.310.1576568430122; Mon, 16 Dec 2019 23:40:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576568430; cv=none; d=google.com; s=arc-20160816; b=PpjqK5oETsFfSiXzmVykVjkI6DpnKkrsfpQWms+PKltOd5yFiaG2z8uezHBvZm1nQX m+WKqw76S9PjIrg0TWsbknnArrSOEQt/S1r2bWitevp6vcDXHUbtzbw4lk4P/ymKOTqf PwyD7Z+h0bZk06YW0TJG9COB2jvRZzDJhlVlBIAvT5Ay5vr6Qspg3SqiljeAPx7XKQWj ES0PZ1xfcXEsMu/2IVbw9utGj9uuAZ0QJeRlbhPzVkGS8KD8/JEh36W77O7nk4Fge1KL t2Z1xRG34EXJafzhyz3G2ap7u9L+XpTcUt9vM3oqWKpT9wjZrSTmXnz2OxbiVkmSNU7d EVLA== 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=kQo8NovRckw3prRmfhQ/lcBt5QynEJTAYpVABXl8rNA=; b=Ujtr6NiLYKJDT1EmIi+VzI8PQf/Sr2Rf14jsElX2qpUuVU7xVlUpdwcHRNcwDKEfQs zO2vbBLWsiMoaavxLoFJ63W/GzSCP+xun0l49GqkIbZVZZkwfyIqMhOrO6Nm855ltP7Z iSCvsXoTVHPI204OAn9UELmjS/uf8eGNRNrXTOeKqE87AaJIXzJE6Awpq+xnW+o18lFg Cephj78hvodHoyoWafGocWFbgYC1XyG5uzCAEiMP5pYA4Imvb/CFRQpEjQ1yoa6QUNro mKoYCXktqoIEocvFe+kyMcFz1o6l3/jJHc4rDq/9m/+oTiJNqsHjUJV81kZMGkGcqrhE fMmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=IBrfzjeX; 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 k17si11840792oiw.238.2019.12.16.23.40.29; Mon, 16 Dec 2019 23:40:30 -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=IBrfzjeX; 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 S1728236AbfLQHk2 (ORCPT + 27 others); Tue, 17 Dec 2019 02:40:28 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:52232 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727840AbfLQHk0 (ORCPT ); Tue, 17 Dec 2019 02:40:26 -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 xBH7eMUE078365; Tue, 17 Dec 2019 01:40:22 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576568422; bh=kQo8NovRckw3prRmfhQ/lcBt5QynEJTAYpVABXl8rNA=; h=From:To:CC:Subject:Date; b=IBrfzjeXKApk6lXdmxd0xoFOahoRgQc+1Az+I8RiO96C4JAOOi2FpTKprdPFXKQXt 5IuUedkX5qBOV8SYqLv/m1+FZHB4eyAmJMYeOuXZuNcwYfmw3b44w4BHTD8UNJEOM9 Q7+oUgl+xkbtOIWXb+urr1h46W9shID02WaiSaAE= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBH7eM1o010419; Tue, 17 Dec 2019 01:40:22 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) 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; Tue, 17 Dec 2019 01:40:19 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) 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 via Frontend Transport; Tue, 17 Dec 2019 01:40:19 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBH7eHjj070038; Tue, 17 Dec 2019 01:40:18 -0600 From: Peter Ujfalusi To: , CC: , , Subject: [PATCH] ata: pxa: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 09:40:33 +0200 Message-ID: <20191217074033.21831-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. Signed-off-by: Peter Ujfalusi --- drivers/ata/pata_pxa.c | 7 +++---- 1 file changed, 3 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/ata/pata_pxa.c b/drivers/ata/pata_pxa.c index 41430f79663c..71678bed04b0 100644 --- a/drivers/ata/pata_pxa.c +++ b/drivers/ata/pata_pxa.c @@ -274,10 +274,9 @@ static int pxa_ata_probe(struct platform_device *pdev) /* * Request the DMA channel */ - data->dma_chan = - dma_request_slave_channel(&pdev->dev, "data"); - if (!data->dma_chan) - return -EBUSY; + data->dma_chan = dma_request_chan(&pdev->dev, "data"); + if (IS_ERR(data->dma_chan)) + return PTR_ERR(data->dma_chan); ret = dmaengine_slave_config(data->dma_chan, &config); if (ret < 0) { dev_err(&pdev->dev, "dma configuration failed: %d\n", ret);