From patchwork Tue Dec 17 07:50:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181840 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5409693ile; Mon, 16 Dec 2019 23:50:44 -0800 (PST) X-Google-Smtp-Source: APXvYqyrC50HS2sB5UfOSWE1XnT34rvDZGCSo01ft5sGqXUO3TAFWS4MwVi7G642dzz1CQDvpScx X-Received: by 2002:a05:6830:20cf:: with SMTP id z15mr36370793otq.277.1576569044635; Mon, 16 Dec 2019 23:50:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576569044; cv=none; d=google.com; s=arc-20160816; b=uf+3lJiSr3EUFLJ971j7g0FDxdDLOxZcbRSxl1XlYjHCu2Af0hkVSIkLg3x1GqPH/L 2BFJY7ZSDtwEgth01adT5H8p61alrUtPPNU5FpHVNOcEYiuN5e88bdeqDikf3z5LEbUs oFYe9PgO3xW9fGmqJenQt2PjyQJ/POO7U8rKXxkUUfuMz0sTRMzPZO9N5Jl6dlugxdI7 wP6LamAgO7nIy7dWLedNwZrD66Um5f5fJ/c8t+hReS9cx18SYkDITy64cDMY/ZwNx2Pt YcgsA0OVk40Q6o4zpQZyyMmVMmz36+UQNfDBpNCnL3u8dXJ2jEej7Cj5iIkrxdbcGJdN AqJg== 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=MaH2sErLpxeYmngtjI6q6hiIGh8Im8kVUfACGcBFcxM=; b=B1HnlbSAKWp/7pD4vvDmxcbo/nuYBE57aonnfox9TDUcweKg/CO8oxMf8//0KE8lwi 0wV1vrV91m8JrkUR6ga7acRHzy/LUot+Eia/8+5haENaaUjy2j1nRoEJSWWeA4VjzV+x HaCykTCh1KVPiui3BDr8rr25X67iKN+vvMIlwKVkHxJNMGfHl5qGWPYpg5I09E1I5e0x +S4bwMpIyWKEcxwkg687HHAFioRjkb1jr2yJcbhJhWUI/nrkacBHTsZXQufBLgR0bDJ/ dNBMkC/GsQHlyZb/FXakdSoUmBKCgNkO1o6Ngt2GnGdRIB8DYgtU77VYdeDtDbAEtsFx QrSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=PedRStQa; 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 s11si9942891otd.123.2019.12.16.23.50.42; Mon, 16 Dec 2019 23:50:44 -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=PedRStQa; 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 S1726622AbfLQHul (ORCPT + 27 others); Tue, 17 Dec 2019 02:50:41 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:53716 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726545AbfLQHul (ORCPT ); Tue, 17 Dec 2019 02:50:41 -0500 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBH7oVs8082175; Tue, 17 Dec 2019 01:50:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576569031; bh=MaH2sErLpxeYmngtjI6q6hiIGh8Im8kVUfACGcBFcxM=; h=From:To:CC:Subject:Date; b=PedRStQaXUiBsqBd4AfT4VL/96DIog1txXfMnHGsrybqDCxfPSyzFld91tz8U6+DR 13N1UVnHNBYrgp8zJ/Mg9lJuefHkWDkIvWvGdGFtype1chQL2ENwJTgzLooUjFC5lg +2U/4y1ERYRNd6ikLtR7D99HljeV9y2Ib0PzjRDI= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBH7oVOT047317 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2019 01:50:31 -0600 Received: from DFLE114.ent.ti.com (10.64.6.35) 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; Tue, 17 Dec 2019 01:50:30 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE114.ent.ti.com (10.64.6.35) 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:50:30 -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 xBH7oSVU088646; Tue, 17 Dec 2019 01:50:29 -0600 From: Peter Ujfalusi To: CC: , , , , , Subject: [PATCH] iio: adc: at91: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 09:50:43 +0200 Message-ID: <20191217075043.23539-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/iio/adc/at91-sama5d2_adc.c | 6 +++--- 1 file changed, 3 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/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c index e1850f3d5cf3..a5c7771227d5 100644 --- a/drivers/iio/adc/at91-sama5d2_adc.c +++ b/drivers/iio/adc/at91-sama5d2_adc.c @@ -1444,10 +1444,10 @@ static void at91_adc_dma_init(struct platform_device *pdev) if (st->dma_st.dma_chan) return; - st->dma_st.dma_chan = dma_request_slave_channel(&pdev->dev, "rx"); - - if (!st->dma_st.dma_chan) { + st->dma_st.dma_chan = dma_request_chan(&pdev->dev, "rx"); + if (IS_ERR(st->dma_st.dma_chan)) { dev_info(&pdev->dev, "can't get DMA channel\n"); + st->dma_st.dma_chan = NULL; goto dma_exit; }