Commit 4ffdca62 authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown

ASoC: Intel: make const arrays static, reduces object code size

Don't populate the const arrays on the stack but instead make
it static. Makes the object code smaller, for example:

Before:
   text    data     bss     dec     hex filename
  14107    8832     224   23163    5a7b bytcht_es8316.o

After:
   text    data     bss     dec     hex filename
  14015    8896     224   23135    5a5f bytcht_es8316.o

(gcc version 8.2.0 x86_64)
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 3f6a1252
...@@ -437,7 +437,7 @@ static const struct acpi_gpio_mapping byt_cht_es8316_gpios[] = { ...@@ -437,7 +437,7 @@ static const struct acpi_gpio_mapping byt_cht_es8316_gpios[] = {
static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev) static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
{ {
const char * const mic_name[] = { "in1", "in2" }; static const char * const mic_name[] = { "in1", "in2" };
struct byt_cht_es8316_private *priv; struct byt_cht_es8316_private *priv;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct snd_soc_acpi_mach *mach; struct snd_soc_acpi_mach *mach;
......
...@@ -1149,7 +1149,7 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */ ...@@ -1149,7 +1149,7 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */
static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
{ {
const char * const map_name[] = { "dmic1", "dmic2", "in1", "in3" }; static const char * const map_name[] = { "dmic1", "dmic2", "in1", "in3" };
const struct dmi_system_id *dmi_id; const struct dmi_system_id *dmi_id;
struct byt_rt5640_private *priv; struct byt_rt5640_private *priv;
struct snd_soc_acpi_mach *mach; struct snd_soc_acpi_mach *mach;
......
...@@ -919,7 +919,7 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */ ...@@ -919,7 +919,7 @@ struct acpi_chan_package { /* ACPICA seems to require 64 bit integers */
static int snd_byt_rt5651_mc_probe(struct platform_device *pdev) static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
{ {
const char * const mic_name[] = { "dmic", "in1", "in2", "in12" }; static const char * const mic_name[] = { "dmic", "in1", "in2", "in12" };
struct byt_rt5651_private *priv; struct byt_rt5651_private *priv;
struct snd_soc_acpi_mach *mach; struct snd_soc_acpi_mach *mach;
struct device *codec_dev; struct device *codec_dev;
......
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