diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-08-13 10:25:01 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-08-15 10:03:21 -0400 |
commit | 0faf1237c60a3791d7ff32035d3097d3e022e68f (patch) | |
tree | a6e5ef458810140170fcba7d05c25a4f7ba09065 /sound | |
parent | 9c6c417d95d83999c16965186f6e755ad8a8b658 (diff) |
ASoC: soc-core: Fix -Wunused-const-variable warning
If CONFIG_DMI is not set, gcc warns:
sound/soc/soc-core.c:81:27: warning:
dmi_blacklist defined but not used [-Wunused-const-variable=]
Add #ifdef guard around it.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Link: https://lore.kernel.org/r/20190813142501.13080-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index e9f44505cc3e..abe2f47cee6e 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -73,6 +73,7 @@ static int pmdown_time = 5000; | |||
73 | module_param(pmdown_time, int, 0); | 73 | module_param(pmdown_time, int, 0); |
74 | MODULE_PARM_DESC(pmdown_time, "DAPM stream powerdown time (msecs)"); | 74 | MODULE_PARM_DESC(pmdown_time, "DAPM stream powerdown time (msecs)"); |
75 | 75 | ||
76 | #ifdef CONFIG_DMI | ||
76 | /* | 77 | /* |
77 | * If a DMI filed contain strings in this blacklist (e.g. | 78 | * If a DMI filed contain strings in this blacklist (e.g. |
78 | * "Type2 - Board Manufacturer" or "Type1 - TBD by OEM"), it will be taken | 79 | * "Type2 - Board Manufacturer" or "Type1 - TBD by OEM"), it will be taken |
@@ -87,6 +88,7 @@ static const char * const dmi_blacklist[] = { | |||
87 | "Board Product Name", | 88 | "Board Product Name", |
88 | NULL, /* terminator */ | 89 | NULL, /* terminator */ |
89 | }; | 90 | }; |
91 | #endif | ||
90 | 92 | ||
91 | static ssize_t pmdown_time_show(struct device *dev, | 93 | static ssize_t pmdown_time_show(struct device *dev, |
92 | struct device_attribute *attr, char *buf) | 94 | struct device_attribute *attr, char *buf) |