Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11445007ybi; Thu, 25 Jul 2019 16:44:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqz/03ABFFTe8jXE1vSjli4ebtSfyY8rkkdvdN3/UTN5IxLBz0USlGUQhRbkIA6UwsYVvw3c X-Received: by 2002:a17:90a:ba93:: with SMTP id t19mr93706698pjr.139.1564098240678; Thu, 25 Jul 2019 16:44:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564098240; cv=none; d=google.com; s=arc-20160816; b=M5qMYbUI2VXR7dzAlEE94a44YrKoVGT7WdAOyZRxn7FTbF60sP1vkovMEyIVcJT96Z 0OJeiD3M64nGSEvetcj6sYdJ7rYSLLIf1Tu9rTtRtn8uN7NO6Cbo7ARkT8sJSvalTpGK MnaMJQdUZRd1+iNlP6fU+H8ZfUWY6PVbcrb9jYPkfIJrgSdU9GTsTT3n7KI6WGsXyNjx SrtePrhmZSEJGvDpRZisLlVn0iVgXeONt8ZqcT28XrsaNyEuEcSH175agZEY4Uzw7j1R OTZMCVn9tDqtmSIT1+2wzTMmLlSOpYMNCzwmqm9R97k6kg17BPmz1j2QjWbX8gw+GCkM Q5Sw== 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; bh=nG7dq64QclmBZgfZW1EINPPyJFuqj3k5CzAA6fPhBw8=; b=tnJLLzfp06/HecUiyfPc5M6MhXRf40J8m6PyxLLY58SCjQPLIe6SHdbSn6ys6pGuPf FRHolYbZf8ul7iB6lntZ2OkAbIv8lNQ1dE/1kpi7JlN2UTxFNxbmxggRZdZYtfxrrJ+N jBP4Hz4pbY51PT4uanmJVDk9vLiJ+LaeQE4Ce7jH9JGAZcLYp94kf4iwlfKTmKI7cYc/ qMqN4fG1Vg9MOGr8gZ4skBFCKSF0yqsWbrupSLYKms+Nzg6JVxNLZlp5KswX0dW0+azr 8sbKr6ENgohD9DfyKKGHPdH6OhDJdXsC/E1IKbGmyhchqtx/dMlR9K684H4HjEWhaUHH +ugQ== ARC-Authentication-Results: i=1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d37si15978983pla.288.2019.07.25.16.43.45; Thu, 25 Jul 2019 16:44:00 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727162AbfGYXmk (ORCPT + 99 others); Thu, 25 Jul 2019 19:42:40 -0400 Received: from mga06.intel.com ([134.134.136.31]:51850 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727540AbfGYXlt (ORCPT ); Thu, 25 Jul 2019 19:41:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2019 16:41:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,308,1559545200"; d="scan'208";a="369874823" Received: from amrutaku-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.255.230.75]) by fmsmga006.fm.intel.com with ESMTP; 25 Jul 2019 16:41:47 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, vkoul@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, slawomir.blauciak@intel.com, Pierre-Louis Bossart , Sanyog Kale Subject: [RFC PATCH 31/40] soundwire: intel: move shutdown() callback and don't export symbol Date: Thu, 25 Jul 2019 18:40:23 -0500 Message-Id: <20190725234032.21152-32-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> References: <20190725234032.21152-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All DAI callbacks are in intel.c except for shutdown. Move and remove export symbol Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 14 -------------- drivers/soundwire/cadence_master.h | 2 -- drivers/soundwire/intel.c | 17 +++++++++++++++-- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index dede55072191..4a189e487830 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -1381,19 +1381,5 @@ int sdw_cdns_alloc_stream(struct sdw_cdns *cdns, } EXPORT_SYMBOL(sdw_cdns_alloc_stream); -void sdw_cdns_shutdown(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai) -{ - struct sdw_cdns_dma_data *dma; - - dma = snd_soc_dai_get_dma_data(dai, substream); - if (!dma) - return; - - snd_soc_dai_set_dma_data(dai, substream, NULL); - kfree(dma); -} -EXPORT_SYMBOL(sdw_cdns_shutdown); - MODULE_LICENSE("Dual BSD/GPL"); MODULE_DESCRIPTION("Cadence Soundwire Library"); diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire/cadence_master.h index d375bbfead18..de97bc22acb7 100644 --- a/drivers/soundwire/cadence_master.h +++ b/drivers/soundwire/cadence_master.h @@ -177,8 +177,6 @@ int sdw_cdns_alloc_stream(struct sdw_cdns *cdns, void sdw_cdns_config_stream(struct sdw_cdns *cdns, struct sdw_cdns_port *port, u32 ch, u32 dir, struct sdw_cdns_pdi *pdi); -void sdw_cdns_shutdown(struct snd_pcm_substream *substream, - struct snd_soc_dai *dai); int sdw_cdns_pcm_set_stream(struct snd_soc_dai *dai, void *stream, int direction); int sdw_cdns_pdm_set_stream(struct snd_soc_dai *dai, diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 5947fa8e840b..c40ab443e723 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -772,6 +772,19 @@ intel_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) return ret; } +void intel_shutdown(struct snd_pcm_substream *substream, + struct snd_soc_dai *dai) +{ + struct sdw_cdns_dma_data *dma; + + dma = snd_soc_dai_get_dma_data(dai, substream); + if (!dma) + return; + + snd_soc_dai_set_dma_data(dai, substream, NULL); + kfree(dma); +} + static int intel_pcm_set_sdw_stream(struct snd_soc_dai *dai, void *stream, int direction) { @@ -787,14 +800,14 @@ static int intel_pdm_set_sdw_stream(struct snd_soc_dai *dai, static const struct snd_soc_dai_ops intel_pcm_dai_ops = { .hw_params = intel_hw_params, .hw_free = intel_hw_free, - .shutdown = sdw_cdns_shutdown, + .shutdown = intel_shutdown, .set_sdw_stream = intel_pcm_set_sdw_stream, }; static const struct snd_soc_dai_ops intel_pdm_dai_ops = { .hw_params = intel_hw_params, .hw_free = intel_hw_free, - .shutdown = sdw_cdns_shutdown, + .shutdown = intel_shutdown, .set_sdw_stream = intel_pdm_set_sdw_stream, }; -- 2.20.1