Commit 8a6a6a38 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: soc-core: tidyup for CONFIG_DMI

soc-core.c has 2 #ifdef CONFIG_DMI, but we can merge these.
OTOH, soc.h has dmi_longname, but it is needed if CONFIG_DMI was defined.
In other words, It is not needed if CONFIG_DMI was not defined.
This patch tidyup these.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eexbbhyy.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 29d9fc7a
...@@ -986,7 +986,9 @@ struct snd_soc_card { ...@@ -986,7 +986,9 @@ struct snd_soc_card {
const char *long_name; const char *long_name;
const char *driver_name; const char *driver_name;
const char *components; const char *components;
#ifdef CONFIG_DMI
char dmi_longname[80]; char dmi_longname[80];
#endif /* CONFIG_DMI */
char topology_shortname[32]; char topology_shortname[32];
struct device *dev; struct device *dev;
......
...@@ -73,23 +73,6 @@ static int pmdown_time = 5000; ...@@ -73,23 +73,6 @@ static int pmdown_time = 5000;
module_param(pmdown_time, int, 0); module_param(pmdown_time, int, 0);
MODULE_PARM_DESC(pmdown_time, "DAPM stream powerdown time (msecs)"); MODULE_PARM_DESC(pmdown_time, "DAPM stream powerdown time (msecs)");
#ifdef CONFIG_DMI
/*
* If a DMI filed contain strings in this blacklist (e.g.
* "Type2 - Board Manufacturer" or "Type1 - TBD by OEM"), it will be taken
* as invalid and dropped when setting the card long name from DMI info.
*/
static const char * const dmi_blacklist[] = {
"To be filled by OEM",
"TBD by OEM",
"Default String",
"Board Manufacturer",
"Board Vendor Name",
"Board Product Name",
NULL, /* terminator */
};
#endif
static ssize_t pmdown_time_show(struct device *dev, static ssize_t pmdown_time_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
...@@ -1607,6 +1590,21 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd, ...@@ -1607,6 +1590,21 @@ int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
EXPORT_SYMBOL_GPL(snd_soc_runtime_set_dai_fmt); EXPORT_SYMBOL_GPL(snd_soc_runtime_set_dai_fmt);
#ifdef CONFIG_DMI #ifdef CONFIG_DMI
/*
* If a DMI filed contain strings in this blacklist (e.g.
* "Type2 - Board Manufacturer" or "Type1 - TBD by OEM"), it will be taken
* as invalid and dropped when setting the card long name from DMI info.
*/
static const char * const dmi_blacklist[] = {
"To be filled by OEM",
"TBD by OEM",
"Default String",
"Board Manufacturer",
"Board Vendor Name",
"Board Product Name",
NULL, /* terminator */
};
/* /*
* Trim special characters, and replace '-' with '_' since '-' is used to * Trim special characters, and replace '-' with '_' since '-' is used to
* separate different DMI fields in the card long name. Only number and * separate different DMI fields in the card long name. Only number and
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment