From patchwork Tue Dec 17 07:45:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181839 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp5405172ile; Mon, 16 Dec 2019 23:45:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzE8nMPHMj4W8tpxYw0lFoC1JPmeP15KZM+IAQiA0wjRw9AGPLe7OnR9x7dmadDkeKvBT0c X-Received: by 2002:a05:6830:12c1:: with SMTP id a1mr33886940otq.357.1576568702313; Mon, 16 Dec 2019 23:45:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576568702; cv=none; d=google.com; s=arc-20160816; b=AOyIZamm4Pbn6RfVcUXkOXYdAJza/s0pyET+BMEkaPFnMRUt/WKRo0AasoX7tgZ59I P/O9sn/wCbrf0Z6QRzczwxOuUgnmcr0iC6TkeJzAfsJakiHgzMoBcovhT2oQTyO7Cp+A VxDQ7Wb+LvrloxMyAneeact9G8rRk3KYb/7BeQiHzGkAZ2Os2mLfx7GFC6QkP2/AF6r6 v0YtUgbCuolqC4rSLK8/G/w2n1TsLSInt6PaxDC3v0V4k6OTtnzU+Nxews29b+vE9DYy sDP4/FAmNINPDbhXlHRqw2RvWtcUb/YzOEkbGJsaURFsrQ6eJpStngizaqTmh7FvEmda IoQA== 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=b5wBk0F+R2tKX9Jfr0hu+FEeVGuPCo3CtdCMf1Fl6z0=; b=RpixtshyMeVRDGIPli3h6pUhR0q7828oo4zQTlPdhPCReZ1L/ynv7FkirCsk0TZUr1 8Aida9O6yD5suwJ93QXPu1TasGqMeD3PgLd5mT4WNZr+zEPOoeIaDJXDPH3ledMylv0z tizkyd0TrhO1hWI6JGHYx0QOJZj/8QVDud3G61700OU6tF8O5uRc/EDRA65W2fQD/spo RUA0/n72MktXqTRiolvojMPzYx5xxrRFtM4XpfB1J4adNYCFNyfe/A83PMFYIcJW6hsu FZHU8LVSO13xcCRPerHr8uRLeZGyEXHPvqUvlQqJNfUJjYZeKo/ihyJObMSQSwkt7htg muDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ocdDM+0+; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-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 25si11817003oiz.230.2019.12.16.23.45.02; Mon, 16 Dec 2019 23:45:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-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=ocdDM+0+; spf=pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-i2c-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 S1726141AbfLQHpB (ORCPT + 2 others); Tue, 17 Dec 2019 02:45:01 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:54872 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725868AbfLQHpB (ORCPT ); Tue, 17 Dec 2019 02:45:01 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBH7irHs010018; Tue, 17 Dec 2019 01:44:53 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576568693; bh=b5wBk0F+R2tKX9Jfr0hu+FEeVGuPCo3CtdCMf1Fl6z0=; h=From:To:CC:Subject:Date; b=ocdDM+0+2oMtaIT2PjYA5ioIOdbnnk2y5S/OFwISnRwof5f8o5YTEYoBbI4+pXlSg iRLP3L2fcUFgREHp0QgEnZmNr5fpMTr5f6vAGxN8BO1fKCAUZYb+BIYZ3jZUDnbYxE PcK5OBT4wq87fxA48ONBEUB7B7ZjrAvQUsrA6Kfo= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBH7ir5s017765; Tue, 17 Dec 2019 01:44:53 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) 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:44:52 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE110.ent.ti.com (10.64.6.31) 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:44:52 -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 xBH7iopt102141; Tue, 17 Dec 2019 01:44:50 -0600 From: Peter Ujfalusi To: , CC: , , , Subject: [PATCH] i2c: mxs: Use dma_request_chan() instead dma_request_slave_channel() Date: Tue, 17 Dec 2019 09:45:05 +0200 Message-ID: <20191217074505.22527-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-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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/i2c/busses/i2c-mxs.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/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index 89224913f578..03f5eee9883a 100644 --- a/drivers/i2c/busses/i2c-mxs.c +++ b/drivers/i2c/busses/i2c-mxs.c @@ -836,10 +836,10 @@ static int mxs_i2c_probe(struct platform_device *pdev) } /* Setup the DMA */ - i2c->dmach = dma_request_slave_channel(dev, "rx-tx"); - if (!i2c->dmach) { + i2c->dmach = dma_request_chan(dev, "rx-tx"); + if (IS_ERR(i2c->dmach)) { dev_err(dev, "Failed to request dma\n"); - return -ENODEV; + return PTR_ERR(i2c->dmach); } platform_set_drvdata(pdev, i2c);