From patchwork Thu Feb 11 12:17:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 61746 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp155031lbl; Thu, 11 Feb 2016 04:18:13 -0800 (PST) X-Received: by 10.66.102.97 with SMTP id fn1mr66555789pab.131.1455193093556; Thu, 11 Feb 2016 04:18:13 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id fe1si12280755pac.200.2016.02.11.04.18.12; Thu, 11 Feb 2016 04:18:13 -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 S1752948AbcBKMSG (ORCPT + 30 others); Thu, 11 Feb 2016 07:18:06 -0500 Received: from mail-wm0-f43.google.com ([74.125.82.43]:37709 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752808AbcBKMRy (ORCPT ); Thu, 11 Feb 2016 07:17:54 -0500 Received: by mail-wm0-f43.google.com with SMTP id g62so66316030wme.0 for ; Thu, 11 Feb 2016 04:17:54 -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=R+Gw43X8Pxlr+V0ojBabJxJiF0Y7qDVEJWwH0Pyf8z4=; b=BOrXqeQVBd8zj1nbh5+SEDAZcDSyLA9KmNPIt3ZqfNyy85drqteASoBuYofI0Ma4Bj PNniY00wtoJ5gGuyj7f/fNTM/9tZWwr2+Y+/jdHVikaGBRfGWd3ukhKn2LoPPUKqW6Iy qcWFWPiKB5pcHuGpjlV8uTWEwChLy1pKBqWQI= 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=R+Gw43X8Pxlr+V0ojBabJxJiF0Y7qDVEJWwH0Pyf8z4=; b=Dphktdb1OcZ+YGkP6DI3JgRy0iSuSANQf/0B+BKU/xV1p3Ls8zTMcht36bYs3UoVOv Pymg9pIinUtLvmRIYe9Dj1ARruxKFBoPuQUA2fVhXeJxJXqeFPgHqzkn00y2bDjnvfMP CyJK1A6VfsFbqBxZfty17BPSbtTUXI5oZZIYU0WhBr17CReFbFjG34XQ3aw8LECQ1t0b 0dQQeTF9bwPU03U3X/iyoj94PEFQ38jtvKRQBIuW9Fiu0WbL5K634gq1tSdCvs6vBRWG yXyfxFRpEfIddCZyP5mPH7mRnYO+ihA4p/F798158wiucz7vfTZeu2IbUaGFRCbkcyhn +z9w== X-Gm-Message-State: AG10YORSQGZ+cseJpCQ6nGPSOD57zc7Z5bTGZJUidS0d/mTBjpmwgmZ8FroHCVE+jDfY6hpO X-Received: by 10.28.127.5 with SMTP id a5mr18151272wmd.32.1455193073476; Thu, 11 Feb 2016 04:17:53 -0800 (PST) Received: from localhost.localdomain (host-92-13-246-184.as43234.net. [92.13.246.184]) by smtp.gmail.com with ESMTPSA id lm5sm7300738wjc.12.2016.02.11.04.17.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Feb 2016 04:17:52 -0800 (PST) From: Srinivas Kandagatla To: Patrick Lai , alsa-devel@alsa-project.org, Mark Brown Cc: Banajit Goswami , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, kwestfie@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v3 06/14] ASoC: qcom: rename rdma_ch_bit_map to dma_ch_bit_map Date: Thu, 11 Feb 2016 12:17:51 +0000 Message-Id: <1455193071-1746-1-git-send-email-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455193007-1481-1-git-send-email-srinivas.kandagatla@linaro.org> References: <1455193007-1481-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 Acked-by: Kenneth Westfield --- 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 99061f4..ca3bbd5 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];