Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: linux-sound@vger.kernel.org
Cc: alsa-devel@alsa-project.org, tiwai@suse.de, broonie@kernel.org,
	Brent Lu <brent.lu@intel.com>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Subject: [PATCH 12/18] ASoC: Intel: maxim-common: change max98373 data to static
Date: Thu,  9 May 2024 11:34:12 -0500	[thread overview]
Message-ID: <20240509163418.67746-13-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20240509163418.67746-1-pierre-louis.bossart@linux.intel.com>

From: Brent Lu <brent.lu@intel.com>

Since there is dai link helper max_98373_dai_link, we could change all
functions and data of max98373 to static.

Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
 sound/soc/intel/boards/sof_maxim_common.c | 18 ++++++++----------
 sound/soc/intel/boards/sof_maxim_common.h |  6 ------
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/sound/soc/intel/boards/sof_maxim_common.c b/sound/soc/intel/boards/sof_maxim_common.c
index c38c5598d87f..6c40ecc04723 100644
--- a/sound/soc/intel/boards/sof_maxim_common.c
+++ b/sound/soc/intel/boards/sof_maxim_common.c
@@ -39,14 +39,16 @@ static unsigned int get_num_codecs(const char *hid)
 	return dev_num;
 }
 
+/*
+ * Maxim MAX98373
+ */
 #define MAX_98373_PIN_NAME 16
 
-const struct snd_soc_dapm_route max_98373_dapm_routes[] = {
+static const struct snd_soc_dapm_route max_98373_dapm_routes[] = {
 	/* speaker */
 	{ "Left Spk", NULL, "Left BE_OUT" },
 	{ "Right Spk", NULL, "Right BE_OUT" },
 };
-EXPORT_SYMBOL_NS(max_98373_dapm_routes, SND_SOC_INTEL_SOF_MAXIM_COMMON);
 
 static struct snd_soc_codec_conf max_98373_codec_conf[] = {
 	{
@@ -59,7 +61,7 @@ static struct snd_soc_codec_conf max_98373_codec_conf[] = {
 	},
 };
 
-struct snd_soc_dai_link_component max_98373_components[] = {
+static struct snd_soc_dai_link_component max_98373_components[] = {
 	{  /* For Right */
 		.name = MAX_98373_DEV0_NAME,
 		.dai_name = MAX_98373_CODEC_DAI,
@@ -69,7 +71,6 @@ struct snd_soc_dai_link_component max_98373_components[] = {
 		.dai_name = MAX_98373_CODEC_DAI,
 	},
 };
-EXPORT_SYMBOL_NS(max_98373_components, SND_SOC_INTEL_SOF_MAXIM_COMMON);
 
 static int max_98373_hw_params(struct snd_pcm_substream *substream,
 			       struct snd_pcm_hw_params *params)
@@ -96,7 +97,7 @@ static int max_98373_hw_params(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
+static int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
 {
 	struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
 	struct snd_soc_dai *codec_dai;
@@ -139,15 +140,13 @@ int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
 
 	return ret;
 }
-EXPORT_SYMBOL_NS(max_98373_trigger, SND_SOC_INTEL_SOF_MAXIM_COMMON);
 
-struct snd_soc_ops max_98373_ops = {
+static const struct snd_soc_ops max_98373_ops = {
 	.hw_params = max_98373_hw_params,
 	.trigger = max_98373_trigger,
 };
-EXPORT_SYMBOL_NS(max_98373_ops, SND_SOC_INTEL_SOF_MAXIM_COMMON);
 
-int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
+static int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
 {
 	struct snd_soc_card *card = rtd->card;
 	unsigned int num_codecs = get_num_codecs(MAX_98373_ACPI_HID);
@@ -186,7 +185,6 @@ int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
 
 	return ret;
 }
-EXPORT_SYMBOL_NS(max_98373_spk_codec_init, SND_SOC_INTEL_SOF_MAXIM_COMMON);
 
 void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link)
 {
diff --git a/sound/soc/intel/boards/sof_maxim_common.h b/sound/soc/intel/boards/sof_maxim_common.h
index 2d8257cc5229..3d34c7dae6f5 100644
--- a/sound/soc/intel/boards/sof_maxim_common.h
+++ b/sound/soc/intel/boards/sof_maxim_common.h
@@ -20,14 +20,8 @@
 #define MAX_98373_DEV0_NAME	"i2c-" MAX_98373_ACPI_HID ":00"
 #define MAX_98373_DEV1_NAME	"i2c-" MAX_98373_ACPI_HID ":01"
 
-extern struct snd_soc_dai_link_component max_98373_components[2];
-extern struct snd_soc_ops max_98373_ops;
-extern const struct snd_soc_dapm_route max_98373_dapm_routes[];
-
-int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd);
 void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link);
 void max_98373_set_codec_conf(struct snd_soc_card *card);
-int max_98373_trigger(struct snd_pcm_substream *substream, int cmd);
 
 /*
  * Maxim MAX98390
-- 
2.40.1


  parent reply	other threads:[~2024-05-09 16:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 16:34 [PATCH 00/18] ASoC: Intel: updates for 6.10 - part7 Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 01/18] ASoC: Intel: sof_sdw_rt_sdca_jack_common: remove -sdca for new codecs Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 02/18] ASoC: Intel: sof-rt5682: remove DMI quirk for hatch Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 03/18] ASoC: Intel: sof_rt5682: board id cleanup for mtl boards Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 04/18] ASoC: Intel: realtek-common: remove 2-spk rt1015p config Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 05/18] ASoC: Intel: soc-acpi-intel-mtl-match: add cs42l43 only support Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 06/18] ASoC: Intel: soc-acpi-intel-lnl-match: " Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 07/18] ASoC: Intel: maxim-common: add max_98373_dai_link function Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 08/18] ASoC: Intel: sof_da7219: use " Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 09/18] ASoC: Intel: sof_nau8825: " Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 10/18] ASoC: Intel: sof_rt5682: " Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 11/18] ASoC: Intel: sof_sdw: add max98373 dapm routes Pierre-Louis Bossart
2024-05-09 16:34 ` Pierre-Louis Bossart [this message]
2024-05-09 16:34 ` [PATCH 13/18] ASoC: Intel: sof_sdw_cs_amp: rename Speakers to Speaker Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 14/18] ASoC: Intel: sof_sdw: use generic name for controls/widgets Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 15/18] ASoC: Intel: sof_sdw: add controls and dapm widgets in codec_info Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 16/18] ASoC: Intel: sof_sdw: use .controls/.widgets to add controls/widgets Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 17/18] ASoC: Intel: sof_sdw: add dai parameter to rtd_init callback Pierre-Louis Bossart
2024-05-09 16:34 ` [PATCH 18/18] ASoC: Intel: sof_sdw_rt_amp: use dai parameter Pierre-Louis Bossart
2024-05-10 13:18 ` [PATCH 00/18] ASoC: Intel: updates for 6.10 - part7 Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240509163418.67746-13-pierre-louis.bossart@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=brent.lu@intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox