Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3614848ybl; Mon, 3 Feb 2020 03:32:27 -0800 (PST) X-Google-Smtp-Source: APXvYqwMi8jy64MuTtNAqVQCCynLhvY0/2vm/+mv5JSJ4hwubiwmy4okFHJnEw/X1xcS5dZlN4hk X-Received: by 2002:a05:6830:114f:: with SMTP id x15mr16828283otq.291.1580729547121; Mon, 03 Feb 2020 03:32:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580729547; cv=none; d=google.com; s=arc-20160816; b=rWShHGr0xodvEAOZ4hjp+o1qLpnmVWPuLprvwBbzjOhVzIbWiZPRr+Jlt47ci3/nXV wDw+2VMeNDKtOrcr3oQyhszyT7NYOZKLJlM4Us+Pn/+KetJ6bIbOt/c/HWroxeXqO8IL t1M2bmpMn9KExOd+mXnBl7F86G5ekjXLbUQ1L6iJ0kjGgdoVmX7RbjWwXdPLMkgRhe4U JuswpKxrzrWH5Yt/Q8ikN67P0Clwcmnj714DHCC8vvWfeaQABqYdvMTFh75CPijrvsQ5 h6WTcuPnIHHp6i5hF5LTNfgsg7CNJnFacbXux4AX1ENVDTwoYdi+5/BODaZ9cZUTv78A mx1g== 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=WIVihqnSycLXDyolXt07z45P16RfSqFN74PakBFswQc=; b=nEkpLHtLxdQw94IfKjokTml13nXjEfy/lTQRRGe1qTVf3qUoiEmsmLbQ+sTqw9vJ7g qI2WSXu2s6XnuJtEzdPBLsi2ZF7na3cfwyfRRfj85AdtRuOJp4QHUcfLk54VHrfmcABY 3jOVR496vzqrS1h6oHFnhIOgewc/442IRXUQtea/uGX/lbQzwt2s+W1R9o396LWUhRx+ lHEIfcmNqYBcS/gZNtfyKzVxPyDBP79DaXuKBedBZu8cOlQhiakx33Dk2noZMdy4N2jy cUUHFrXrKlbolPUuwL7nSTivtk88wIO6NPt/DtxLxadxjpL3Gey263q6cVVBQPG2dzOJ xxnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=HYNKCXyr; 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 n15si926377oic.234.2020.02.03.03.32.14; Mon, 03 Feb 2020 03:32:27 -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=HYNKCXyr; 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 S1727989AbgBCKS0 (ORCPT + 99 others); Mon, 3 Feb 2020 05:18:26 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:57930 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727023AbgBCKSS (ORCPT ); Mon, 3 Feb 2020 05:18:18 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 013AIDDl127288; Mon, 3 Feb 2020 04:18:13 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1580725093; bh=WIVihqnSycLXDyolXt07z45P16RfSqFN74PakBFswQc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=HYNKCXyrdjSTspK0uJHd8pdl0ZPPlWQaJyxbgYAbFuJP8VfMRPXN4pX89awzUvIsZ xLKDsO3ywfRmi8GS/FfSuBCu2BMlL/1kWieokk9H7edicZrwRJxISciOclRbmMjMUA XnxmQTqLgVgyWKEIKpCbGUnKpc4KoryZsJj9VS9E= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 013AIDr2039797 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 3 Feb 2020 04:18:13 -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; Mon, 3 Feb 2020 04:18:12 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) 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; Mon, 3 Feb 2020 04:18:12 -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 013AI7mU040513; Mon, 3 Feb 2020 04:18:11 -0600 From: Peter Ujfalusi To: CC: , , Subject: [PATCH 2/3] dmaengine: Mark dma_request_slave_channel() deprecated Date: Mon, 3 Feb 2020 12:18:05 +0200 Message-ID: <20200203101806.2441-3-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203101806.2441-1-peter.ujfalusi@ti.com> References: <20200203101806.2441-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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 New drivers should use dma_request_chan() instead dma_request_slave_channel() dma_request_slave_channel() is a simple wrapper for dma_request_chan() eating up the error code for channel request failure and makes deferred probing impossible. Move the dma_request_slave_channel() into the header as inline function, mark it as deprecated. Signed-off-by: Peter Ujfalusi --- drivers/dma/dmaengine.c | 18 ------------------ include/linux/dmaengine.h | 15 +++++++++------ 2 files changed, 9 insertions(+), 24 deletions(-) diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 121231300d35..8ec2257a8d88 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c @@ -781,24 +781,6 @@ struct dma_chan *dma_request_chan(struct device *dev, const char *name) } EXPORT_SYMBOL_GPL(dma_request_chan); -/** - * dma_request_slave_channel - try to allocate an exclusive slave channel - * @dev: pointer to client device structure - * @name: slave channel name - * - * Returns pointer to appropriate DMA channel on success or NULL. - */ -struct dma_chan *dma_request_slave_channel(struct device *dev, - const char *name) -{ - struct dma_chan *ch = dma_request_chan(dev, name); - if (IS_ERR(ch)) - return NULL; - - return ch; -} -EXPORT_SYMBOL_GPL(dma_request_slave_channel); - /** * dma_request_chan_by_mask - allocate a channel satisfying certain capabilities * @mask: capabilities that the channel must satisfy diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 6702df107d79..4c522bf6ac25 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -1440,7 +1440,6 @@ void dma_issue_pending_all(void); struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, dma_filter_fn fn, void *fn_param, struct device_node *np); -struct dma_chan *dma_request_slave_channel(struct device *dev, const char *name); struct dma_chan *dma_request_chan(struct device *dev, const char *name); struct dma_chan *dma_request_chan_by_mask(const dma_cap_mask_t *mask); @@ -1470,11 +1469,6 @@ static inline struct dma_chan *__dma_request_channel(const dma_cap_mask_t *mask, { return NULL; } -static inline struct dma_chan *dma_request_slave_channel(struct device *dev, - const char *name) -{ - return NULL; -} static inline struct dma_chan *dma_request_chan(struct device *dev, const char *name) { @@ -1544,6 +1538,15 @@ void dma_run_dependencies(struct dma_async_tx_descriptor *tx); #define dma_request_channel(mask, x, y) \ __dma_request_channel(&(mask), x, y, NULL) +/* Deprecated, please use dma_request_chan() directly */ +static inline struct dma_chan * __deprecated +dma_request_slave_channel(struct device *dev, const char *name) +{ + struct dma_chan *ch = dma_request_chan(dev, name); + + return IS_ERR(ch) ? NULL : ch; +} + static inline struct dma_chan *dma_request_slave_channel_compat(const dma_cap_mask_t mask, dma_filter_fn fn, void *fn_param, -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki