From patchwork Tue Dec 17 10:40:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181852 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5557553ile; Tue, 17 Dec 2019 02:40:17 -0800 (PST) X-Google-Smtp-Source: APXvYqxXJeKzFHZli3Ou6oDcLOHIFGmomaQ/AiAAHIW9R3RECs1/OPhX04tflyT51+7z6VN13G2W X-Received: by 2002:a05:6830:12d0:: with SMTP id a16mr37720096otq.8.1576579216909; Tue, 17 Dec 2019 02:40:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576579216; cv=none; d=google.com; s=arc-20160816; b=WdyefGrL6pMmLIraYSkO/HHPGZ5tqE8cFd2Bl+H0sdXerU/Hr4EMDNSvpHIx6aAZqP STcBe3g+b3o9u/rZhljmlOL9qtJE189xi/RIAxkN8JVpCsge4JBnzU9xSwQyjcWEtFYA VnWNt0m9dobaYitCXKbIg0pl/6OFMy8lISSGnHbB2A+EkQkoJf7c1wTyT/uXIwzj7HV2 Qdf+vKzjEkpjDue/PH5N4y/KSZNQmLleK6fOZ0gaRjvlPGrZY3DP3XZaHeo8k9dhbXDr wWcPK+nzoB8+bMiz1xS9w/wbxxr1wm2mRlcRQarv48S2+jqqrMB2KO9NdoxxxWPzD9bm RNDw== 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=V1JmF9ix8iZEnPqA63zPzUT60yfRxIKuz/XAj8YrYlc=; b=IkY4I/qh+KsYPNro5spxq3tweUqeU6LJ/QNFqCT8fZkSMGfGBB42O2KF19TUkdKPqL MpTa0fCRHc8lZPJWAHg+Y/rSsVhl8uGR7Hw8ygFH5nNnGyJo1PIk9wv9bvN8MKM8TMhf HIO5Iwfq0v0kPuIbTAxUae+Ufbact3ftFI8CKHnKBgRMgKwtPpyvS5HVq87CMoHc0D8h xX724Bq6DZ358WWnVqgXmlwY4YNJdTW8xb39CITN6k5qgQqBOruWWb2BttgKzvVrnctB of/U5YrbRHnkkuywOSoyF3mk7B6GipslikWdNMU8XM9MEXx9RfJ0+/X0YORizqK5KCA4 xufQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=TVVQSbux; 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.40.16; Tue, 17 Dec 2019 02:40:16 -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=TVVQSbux; 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 S1726824AbfLQKkP (ORCPT + 27 others); Tue, 17 Dec 2019 05:40:15 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:60208 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725870AbfLQKkP (ORCPT ); Tue, 17 Dec 2019 05:40:15 -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 xBHAeCwB114330; Tue, 17 Dec 2019 04:40:12 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576579212; bh=V1JmF9ix8iZEnPqA63zPzUT60yfRxIKuz/XAj8YrYlc=; h=From:To:CC:Subject:Date; b=TVVQSbuxj1fHsYHgf5JSJI3T7lG3NKaVLOPPTcdJJ5R9AjdN6NCzM1LeUYeztNx5W IwWSNCz77Eftgk3ZZWskPyG0Z3lLrO36VDT6intt1iLxGauVmw5ULMLT/3+tjy8SxR jssdOyC42JcmXxiYwdmrXAD+jTG8tY0tDvHU86I4= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBHAeCjv050933 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 17 Dec 2019 04:40:12 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE105.ent.ti.com (10.64.6.26) 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:40:12 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE107.ent.ti.com (10.64.6.28) 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:40:12 -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 xBHAeALb006727; Tue, 17 Dec 2019 04:40:10 -0600 From: Peter Ujfalusi To: , CC: , , , Subject: [PATCH] media: rcar_drif: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 12:40:25 +0200 Message-ID: <20191217104025.23318-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/rcar_drif.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/media/platform/rcar_drif.c b/drivers/media/platform/rcar_drif.c index 0f267a237b42..02ee0e2a09e9 100644 --- a/drivers/media/platform/rcar_drif.c +++ b/drivers/media/platform/rcar_drif.c @@ -275,10 +275,10 @@ static int rcar_drif_alloc_dmachannels(struct rcar_drif_sdr *sdr) for_each_rcar_drif_channel(i, &sdr->cur_ch_mask) { struct rcar_drif *ch = sdr->ch[i]; - ch->dmach = dma_request_slave_channel(&ch->pdev->dev, "rx"); - if (!ch->dmach) { + ch->dmach = dma_request_chan(&ch->pdev->dev, "rx"); + if (IS_ERR(ch->dmach)) { rdrif_err(sdr, "ch%u: dma channel req failed\n", i); - ret = -ENODEV; + ret = PTR_ERR(ch->dmach); goto dmach_error; }