From patchwork Tue Dec 17 10:50:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181857 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5567813ile; Tue, 17 Dec 2019 02:50:43 -0800 (PST) X-Google-Smtp-Source: APXvYqzlLBYw61CKRaA3HrbTSZWQM1CSv5CYubKrE0AI8BPDG2tIfMhP3yMdN2ZyQ+c4Vv7oHLHm X-Received: by 2002:a05:6830:1294:: with SMTP id z20mr36070999otp.60.1576579843666; Tue, 17 Dec 2019 02:50:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576579843; cv=none; d=google.com; s=arc-20160816; b=hhfFyu1WV72QL0JEEUPpcd+VYaUxU+uPo1OCXtV9S+gY/V3uBvnKJWqjzIfK1j2rxM HMxCqN7cHRJ94sBCX/O15cQMXP1Di0inALqUIwErWsEGMy70+1WGbMooPZq/YlcPvHM2 krdBtgxP54sCcmkXjajoBx0D+naIBmLkWpiRx8tG0NDgj0tJzWT2Fz5mnfamNzxYboR2 43NvhiITQH5VLTOACf4NDpJajPn43xUrtukV3J4Cdgk83H8kFiBM6toqRXu+f+Otkrh5 twTM5s9Qw9yMm5XtkkGeiIi+DdcFma5rekxzsheoeboj6wChA8RNRFOs2ygxNTovlcl+ 0GfQ== 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=mNFMFcC05t4v52oPlhk2o6wWbxZw16JxfddIxoRlzLQ=; b=jbb5wwTrjuX9RQggPUfhktNtNYirkPO6wlWC1EF5S7GOdxOPMBz8EjoxC5sB7BgNYo qyqHudCCcYjCNndOadGq+bW7URz8t4UcsUCXByNUE832wQUk9cXa8fwiUJi00uY+xJHu h4jle8vIV+CqQrTNdfCtXVekohXgiUV6EyV3TK3yZ4wytkl/zRA59CnejCVMTJDDk/r7 b+IrMIOOQv6dERm6Y9vqu9GY/U2HvrOxyL/cBFLTv4bxj5WccIpdOR+RBF2og3d2vzhl PRlv69twQav28Wgw6c7dJ4cxoMji1nApKFlxhfSYwEOCX5bAZ130wo+dnC0Dnv/X4Ucv 0Lgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=dLt0JBQr; 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 o2si11936754oig.41.2019.12.17.02.50.43; Tue, 17 Dec 2019 02:50:43 -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=dLt0JBQr; 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 S1727443AbfLQKum (ORCPT + 27 others); Tue, 17 Dec 2019 05:50:42 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:32930 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726655AbfLQKum (ORCPT ); Tue, 17 Dec 2019 05:50:42 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBHAoZOM117616; Tue, 17 Dec 2019 04:50:35 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576579835; bh=mNFMFcC05t4v52oPlhk2o6wWbxZw16JxfddIxoRlzLQ=; h=From:To:CC:Subject:Date; b=dLt0JBQrhwTctsIJomqlhk94hZBf00U4vfjLrTkD2hZT8dsDOVeg5n1KzqkJwVgV2 BPZLhIo+WrCvly5FIBFBUWTwvAqEn74fVeNclog2EnbqRqO6wADZ6OtvWCO2zr2e+T ktWFro6uHeTo4jG8HYhswGbspp24AOOdInn4EVF4= Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBHAoZTm065630 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2019 04:50:35 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE106.ent.ti.com (157.170.170.36) 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 04:50:35 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE113.ent.ti.com (157.170.170.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 04:50:35 -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 xBHAoX3N044630; Tue, 17 Dec 2019 04:50:33 -0600 From: Peter Ujfalusi To: , , CC: , , Subject: [PATCH] ata: pata_arasam_cf: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 12:50:48 +0200 Message-ID: <20191217105048.25327-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_arasan_cf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki Acked-by: Viresh Kumar diff --git a/drivers/ata/pata_arasan_cf.c b/drivers/ata/pata_arasan_cf.c index 135173c8d138..69b555d83f68 100644 --- a/drivers/ata/pata_arasan_cf.c +++ b/drivers/ata/pata_arasan_cf.c @@ -526,9 +526,10 @@ static void data_xfer(struct work_struct *work) /* request dma channels */ /* dma_request_channel may sleep, so calling from process context */ - acdev->dma_chan = dma_request_slave_channel(acdev->host->dev, "data"); - if (!acdev->dma_chan) { + acdev->dma_chan = dma_request_chan(acdev->host->dev, "data"); + if (IS_ERR(acdev->dma_chan)) { dev_err(acdev->host->dev, "Unable to get dma_chan\n"); + acdev->dma_chan = NULL; goto chan_request_fail; } @@ -539,6 +540,7 @@ static void data_xfer(struct work_struct *work) } dma_release_channel(acdev->dma_chan); + acdev->dma_chan = NULL; /* data xferred successfully */ if (!ret) {