Skip to content

Commit 2bb765f

Browse files
brentlubroonie
authored andcommitted
ASoC: Intel: maxim-common: change max98373 data to static
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 <[email protected]> Signed-off-by: Brent Lu <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 15ce635 commit 2bb765f

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

sound/soc/intel/boards/sof_maxim_common.c

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,16 @@ static unsigned int get_num_codecs(const char *hid)
3939
return dev_num;
4040
}
4141

42+
/*
43+
* Maxim MAX98373
44+
*/
4245
#define MAX_98373_PIN_NAME 16
4346

44-
const struct snd_soc_dapm_route max_98373_dapm_routes[] = {
47+
static const struct snd_soc_dapm_route max_98373_dapm_routes[] = {
4548
/* speaker */
4649
{ "Left Spk", NULL, "Left BE_OUT" },
4750
{ "Right Spk", NULL, "Right BE_OUT" },
4851
};
49-
EXPORT_SYMBOL_NS(max_98373_dapm_routes, SND_SOC_INTEL_SOF_MAXIM_COMMON);
5052

5153
static struct snd_soc_codec_conf max_98373_codec_conf[] = {
5254
{
@@ -59,7 +61,7 @@ static struct snd_soc_codec_conf max_98373_codec_conf[] = {
5961
},
6062
};
6163

62-
struct snd_soc_dai_link_component max_98373_components[] = {
64+
static struct snd_soc_dai_link_component max_98373_components[] = {
6365
{ /* For Right */
6466
.name = MAX_98373_DEV0_NAME,
6567
.dai_name = MAX_98373_CODEC_DAI,
@@ -69,7 +71,6 @@ struct snd_soc_dai_link_component max_98373_components[] = {
6971
.dai_name = MAX_98373_CODEC_DAI,
7072
},
7173
};
72-
EXPORT_SYMBOL_NS(max_98373_components, SND_SOC_INTEL_SOF_MAXIM_COMMON);
7374

7475
static int max_98373_hw_params(struct snd_pcm_substream *substream,
7576
struct snd_pcm_hw_params *params)
@@ -96,7 +97,7 @@ static int max_98373_hw_params(struct snd_pcm_substream *substream,
9697
return 0;
9798
}
9899

99-
int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
100+
static int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
100101
{
101102
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
102103
struct snd_soc_dai *codec_dai;
@@ -139,15 +140,13 @@ int max_98373_trigger(struct snd_pcm_substream *substream, int cmd)
139140

140141
return ret;
141142
}
142-
EXPORT_SYMBOL_NS(max_98373_trigger, SND_SOC_INTEL_SOF_MAXIM_COMMON);
143143

144-
struct snd_soc_ops max_98373_ops = {
144+
static const struct snd_soc_ops max_98373_ops = {
145145
.hw_params = max_98373_hw_params,
146146
.trigger = max_98373_trigger,
147147
};
148-
EXPORT_SYMBOL_NS(max_98373_ops, SND_SOC_INTEL_SOF_MAXIM_COMMON);
149148

150-
int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
149+
static int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd)
151150
{
152151
struct snd_soc_card *card = rtd->card;
153152
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)
186185

187186
return ret;
188187
}
189-
EXPORT_SYMBOL_NS(max_98373_spk_codec_init, SND_SOC_INTEL_SOF_MAXIM_COMMON);
190188

191189
void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link)
192190
{

sound/soc/intel/boards/sof_maxim_common.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,8 @@
2020
#define MAX_98373_DEV0_NAME "i2c-" MAX_98373_ACPI_HID ":00"
2121
#define MAX_98373_DEV1_NAME "i2c-" MAX_98373_ACPI_HID ":01"
2222

23-
extern struct snd_soc_dai_link_component max_98373_components[2];
24-
extern struct snd_soc_ops max_98373_ops;
25-
extern const struct snd_soc_dapm_route max_98373_dapm_routes[];
26-
27-
int max_98373_spk_codec_init(struct snd_soc_pcm_runtime *rtd);
2823
void max_98373_dai_link(struct device *dev, struct snd_soc_dai_link *link);
2924
void max_98373_set_codec_conf(struct snd_soc_card *card);
30-
int max_98373_trigger(struct snd_pcm_substream *substream, int cmd);
3125

3226
/*
3327
* Maxim MAX98390

0 commit comments

Comments
 (0)