From patchwork Tue Dec 17 10:41:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181853 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5558898ile; Tue, 17 Dec 2019 02:41:39 -0800 (PST) X-Google-Smtp-Source: APXvYqx7mxRec8VPP5NmTD/Ko6uuk513M6hVWZIOyR2y+zVXWBIOQPE5zIJMwHCXXXAJMi7jtbVB X-Received: by 2002:a9d:69ce:: with SMTP id v14mr31779302oto.248.1576579298997; Tue, 17 Dec 2019 02:41:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576579298; cv=none; d=google.com; s=arc-20160816; b=0u7QFPhLlSj7YZ8dvx7bhqxgLn7g0xzwUMC+CNVkIL926gV9T5NcDOq7PnKWzlLRO+ wpaNSMrHgCTrQ3eug1JoqZvxAjuO3XOA+5yqvJw8I1xxLsnR1H5TcRm1eL2swevUUers TLrCrry/UVm9FH/27jlZUEY8BA1u66P3luKxfJQnZZurb550To9FvulYbyAFYaykSNdJ OhEgZsOn/iLnO6wWlXebsx3Ejdei9Mq8aaKjQg9lWvKoj151KvTJ0Os2LX2OoE0eOzvI DXUi1CVnuNtIyvw0jI1/cTp14jbc1D31FnBZR0x8X6tAhjViG3A5wglcINU2erpVYG4i /J0Q== 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=6kGmIjNfHqdZqSSE4L9c9Vu8ITPfcmfBO4lOVpn5rIo=; b=qlGy9Vs2VH3/9G1iY3MlUewMi58XkSSVWZVWSMlfBKzjOcCGA0H+9orlk2gW8U8S4G CLU2MIxGItHg4j1LeCLOPwe9fvQfPf4eWKgSoa/2DEbMI8bASJonX08eT5loZba0XAzo hJ8pO6/EM/9snr88OmKH5F8PohJRACiZs5VF/BEQuRw0BKF3OnKnqezJAxXGgyVe3+H9 T5lN+2gN56BA0kRGI9BXd9Kg5WI0k1f5CiBXFxZLAs3wSS52+EHZVL5jw/8/jZUDyeuX n8DM60RjFX12Mt0aRNOYUTbFwTy4N7k3lZZLD7xy6ZAnxi6xAljl6yMgVKZydQOrrBO4 RItA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=DM7GS2se; 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 j7si11969428otn.22.2019.12.17.02.41.38; Tue, 17 Dec 2019 02:41:38 -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=DM7GS2se; 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 S1727083AbfLQKlh (ORCPT + 27 others); Tue, 17 Dec 2019 05:41:37 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:60380 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725940AbfLQKlh (ORCPT ); Tue, 17 Dec 2019 05:41:37 -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 xBHAfNk5114661; Tue, 17 Dec 2019 04:41:23 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576579283; bh=6kGmIjNfHqdZqSSE4L9c9Vu8ITPfcmfBO4lOVpn5rIo=; h=From:To:CC:Subject:Date; b=DM7GS2seHa5rf/EfwTB+fD3tjq47Ud8WDX5NkT62OavFHE5zixnKBANet9d02Y2kV VkoRqRTjo9nbiR309GNIzbCAHNcJD58Ns39eUR0ECYzJoQ65vTjqnI6rwcpMuZ8hU9 KNttiuzYataLDZ6231gcQdD5wH8Lg7Yx3RxkLgr8= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBHAfN5x052907 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2019 04:41:23 -0600 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE107.ent.ti.com (157.170.170.37) 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:41:22 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE100.ent.ti.com (157.170.170.30) 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:41:22 -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 xBHAfJta008859; Tue, 17 Dec 2019 04:41:20 -0600 From: Peter Ujfalusi To: , , , CC: , , , , Subject: [PATCH] media: stm32-dcmi: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 12:41:35 +0200 Message-ID: <20191217104135.23554-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/media/platform/stm32/stm32-dcmi.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 Acked-by: Hugues Fruchet diff --git a/drivers/media/platform/stm32/stm32-dcmi.c b/drivers/media/platform/stm32/stm32-dcmi.c index 9392e3409fba..55351872b0c7 100644 --- a/drivers/media/platform/stm32/stm32-dcmi.c +++ b/drivers/media/platform/stm32/stm32-dcmi.c @@ -1910,10 +1910,10 @@ static int dcmi_probe(struct platform_device *pdev) return PTR_ERR(mclk); } - chan = dma_request_slave_channel(&pdev->dev, "tx"); - if (!chan) { + chan = dma_request_chan(&pdev->dev, "tx"); + if (IS_ERR(chan)) { dev_info(&pdev->dev, "Unable to request DMA channel, defer probing\n"); - return -EPROBE_DEFER; + return PTR_ERR(chan); } spin_lock_init(&dcmi->irqlock);