From patchwork Thu Dec 12 13:55:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 181488 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp802550och; Thu, 12 Dec 2019 05:56:22 -0800 (PST) X-Google-Smtp-Source: APXvYqxkeW4AYtRUdqTLn1koqt4oU/L8YdfIp+LjdiP7iUo7nBQDfSAFLuqE4GJIBhqiI5FDSzmK X-Received: by 2002:a05:6830:1d6e:: with SMTP id l14mr8250320oti.32.1576158982111; Thu, 12 Dec 2019 05:56:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576158982; cv=none; d=google.com; s=arc-20160816; b=puwcAoU7rvTqpdxrqLlvrB2Lh+BCC58JOlSwW+I821SECHLkS7An0qDECZ1BUu3FA2 52UMCLxYZMAUEdwqbVZz2k/WP3aeO9Qy9mrHzTEc+2luqFHWArEfBLRDxrBuD13v3ucM eFdUahWLVnVjahAUAWx67BwImT4lwed0sTHg8Nlf6NlKqhswEiHwvxjxVsTxYMWjdtDL bexI5rRNeHhNm668eKD1nf6rCd6HTn8UUvMsdQpzrYYle7BetmQ0s5JzECiBBwnpyBlS oQl5cKDrKFbpAefnbOVEkdmep9yBaULJWm6wGcwa3JyCVYM9ErfWYqeAKaikHaCABoHZ /LPA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=HGBMZDd/fXGaR9XHTtH6bBkw3hSH9Gfrrw4s8QFXfZY=; b=K/qIxY/6POeBdK27Gjv1WWdr2EV9+oZ/MZriP3os39C6XjMOCY/n7voK5GJ1MkusUM 07TRRXGXBPK9zUeHZJSP9Of6BCmTxxsp7mgjkQHUFjhyUMc1TZkcuEY3ZXtHhYvEBU4+ hFhArzJT4DWfot0PC1Nb2y7ixmm/r14By9iKh2/cO1f9hWxevol2BugTJxxLkDzoOjtA DyX/Fje7LXlUbn9PPIEuoxL8b6XvYSLSXPTDrxIBbrV16NfprJZEp/YnKqHb0hiQ8O+I lp7NDI5Nd8+VlJVlbUV4D4NEf6WSwtUksMEVdLseEnvm6aWPKLmxdCuy8OlwRsCj90SO NXmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Mp5zn8V3; 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 r8si2890812otp.194.2019.12.12.05.56.21; Thu, 12 Dec 2019 05:56:22 -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=Mp5zn8V3; 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 S1729618AbfLLN4V (ORCPT + 27 others); Thu, 12 Dec 2019 08:56:21 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:49768 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729583AbfLLN4S (ORCPT ); Thu, 12 Dec 2019 08:56:18 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id xBCDu3Fc122268; Thu, 12 Dec 2019 07:56:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1576158964; bh=HGBMZDd/fXGaR9XHTtH6bBkw3hSH9Gfrrw4s8QFXfZY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Mp5zn8V3y+JCkRTFQX9D4mJyoF/9IMo/SZliZ6Q1ilN0xwg9nT0LtLs/homGizKXQ NGxV+c73C2myeHlpqiY1BSJI5kQIhTC0hRNK2WJqYyqkybZzwaerhv8U+ZQmySjAKt JBi65Q7mlbFzS5dy/sxwtQWmhwUe0WyXaJHXfO0k= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xBCDu3jh019465 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Dec 2019 07:56:03 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) 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; Thu, 12 Dec 2019 07:56:03 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE110.ent.ti.com (157.170.170.21) 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; Thu, 12 Dec 2019 07:56:03 -0600 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id xBCDtdqV048444; Thu, 12 Dec 2019 07:55:59 -0600 From: Peter Ujfalusi To: , , , , , , , , , CC: , , , , , Subject: [PATCH 5/9] spi: mxs: Use dma_request_chan() instead dma_request_slave_channel() Date: Thu, 12 Dec 2019 15:55:46 +0200 Message-ID: <20191212135550.4634-6-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191212135550.4634-1-peter.ujfalusi@ti.com> References: <20191212135550.4634-1-peter.ujfalusi@ti.com> 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/spi/spi-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/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index 996c1c8a9c71..dce85ee07cd0 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c @@ -590,10 +590,10 @@ static int mxs_spi_probe(struct platform_device *pdev) if (ret) goto out_master_free; - ssp->dmach = dma_request_slave_channel(&pdev->dev, "rx-tx"); - if (!ssp->dmach) { + ssp->dmach = dma_request_chan(&pdev->dev, "rx-tx"); + if (IS_ERR(ssp->dmach)) { dev_err(ssp->dev, "Failed to request DMA\n"); - ret = -ENODEV; + ret = PTR_ERR(ssp->dmach); goto out_master_free; }