From patchwork Mon Feb 1 17:29:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 60952 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp170572lbb; Mon, 1 Feb 2016 09:29:19 -0800 (PST) X-Received: by 10.98.73.8 with SMTP id w8mr22017095pfa.106.1454347759087; Mon, 01 Feb 2016 09:29:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id bw10si26529466pab.22.2016.02.01.09.29.18; Mon, 01 Feb 2016 09:29:19 -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; 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; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754687AbcBAR3P (ORCPT + 30 others); Mon, 1 Feb 2016 12:29:15 -0500 Received: from mail-wm0-f52.google.com ([74.125.82.52]:33655 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753633AbcBAR3L (ORCPT ); Mon, 1 Feb 2016 12:29:11 -0500 Received: by mail-wm0-f52.google.com with SMTP id l66so81100796wml.0 for ; Mon, 01 Feb 2016 09:29:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NzRnjx+7UCnQTB/O++2iBV2I38KDAuq7uxP3syBIbNM=; b=SARtUI/XrDMXkLzFh3mrhBNX1HrH6PDl/hgur7TUVZduMmtR1H4ukh59PMQqB8b91p H1GHZAMSpTCFTaaXtPaa4xgPO76BIMvcw3py2QDVkWunEZkzP1VhvtbHRaHdGqf3FZEO d+DGimiKh3wbRy6mrmsjIpGV51UXXaqUlIpt8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NzRnjx+7UCnQTB/O++2iBV2I38KDAuq7uxP3syBIbNM=; b=Mvd/oo36dsxBBaecciF0UBb68yz1aGY3fJluRHDDIjEVc+oamqYg5XFhjItHle4W5Q +z9EFlLYOR3FOODInZSCLYW/NV7qwdRPkljrJR8iSjX6CrOeyedgsUm8rRTJPJY3g5B1 qs/7DCN2xZN3CtsMy+gFWRr0cSY5zgtGb19De2BwD1Mt3wSrDVIFirfflnzFQFR4Q0vh Cg5Amz4u5D+XGCH+BvTw34vAI4ldQsjqIF7kCD2HpLt+H3FUt7zGXQVKOQZlYZaDYIsx BX0S7pi5ujOXvq8qeZbsGjJDfxVCHQPfSVKjLBI5YnDFPRm3Xw5k6vzhtudcqnTzLufy Gh+A== X-Gm-Message-State: AG10YOSVAjOmXUpdEVlzIPQXMG3dbK0ejAIEjBSEwiOEP1IpT+MglF2om5zd4EFmrb8RUtDy X-Received: by 10.28.30.132 with SMTP id e126mr13914974wme.42.1454347750191; Mon, 01 Feb 2016 09:29:10 -0800 (PST) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id p9sm30161072wjy.41.2016.02.01.09.29.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 09:29:09 -0800 (PST) From: Srinivas Kandagatla To: Patrick Lai , alsa-devel@alsa-project.org Cc: Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH RFC 09/15] ASoC: qcom: rename rdma_ch_bit_map to dma_ch_bit_map Date: Mon, 1 Feb 2016 17:29:07 +0000 Message-Id: <1454347747-10758-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454347622-9970-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1454347622-9970-1-git-send-email-srinivas.kandagatla@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org rdma_ch_bit_map can be reused for wrdma channel allocations as wrdma channel numbering start after rdma channel numbers. With capture support referring rdma_ch_bit_map for wrdma channel allocation is confusing, so renaming rdma_ch_bit_map to dma_ch_bit_map makes sense. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/lpass-apq8016.c | 6 +++--- sound/soc/qcom/lpass.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) -- 1.9.1 diff --git a/sound/soc/qcom/lpass-apq8016.c b/sound/soc/qcom/lpass-apq8016.c index 2d43842..df44f09 100644 --- a/sound/soc/qcom/lpass-apq8016.c +++ b/sound/soc/qcom/lpass-apq8016.c @@ -137,20 +137,20 @@ static int apq8016_lpass_alloc_dma_channel(struct lpass_data *drvdata, int direction) { struct lpass_variant *v = drvdata->variant; - int chan = find_first_zero_bit(&drvdata->rdma_ch_bit_map, + int chan = find_first_zero_bit(&drvdata->dma_ch_bit_map, v->rdma_channels); if (chan >= v->rdma_channels) return -EBUSY; - set_bit(chan, &drvdata->rdma_ch_bit_map); + set_bit(chan, &drvdata->dma_ch_bit_map); return chan; } static int apq8016_lpass_free_dma_channel(struct lpass_data *drvdata, int chan) { - clear_bit(chan, &drvdata->rdma_ch_bit_map); + clear_bit(chan, &drvdata->dma_ch_bit_map); return 0; } diff --git a/sound/soc/qcom/lpass.h b/sound/soc/qcom/lpass.h index 8475b60..30714ad 100644 --- a/sound/soc/qcom/lpass.h +++ b/sound/soc/qcom/lpass.h @@ -50,7 +50,7 @@ struct lpass_data { struct lpass_variant *variant; /* bit map to keep track of static channel allocations */ - unsigned long rdma_ch_bit_map; + unsigned long dma_ch_bit_map; /* used it for handling interrupt per dma channel */ struct snd_pcm_substream *substream[LPASS_MAX_DMA_CHANNELS];