Commit 2db5f9e9 authored by Colin Ian King's avatar Colin Ian King Committed by Mark Brown

ASoC: fsl_spdif: make const arrays rate static

Don't populate the const arrays rate on the stack, instead make them
static. Makes the object code smaller by 220 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
  24385	   9776	    128	  34289	   85f1	sound/soc/fsl/fsl_spdif.o

After:
   text	   data	    bss	    dec	    hex	filename
  24005	   9936	    128	  34069	   8515	sound/soc/fsl/fsl_spdif.o
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b1dc00ab
...@@ -1110,7 +1110,7 @@ static u32 fsl_spdif_txclk_caldiv(struct fsl_spdif_priv *spdif_priv, ...@@ -1110,7 +1110,7 @@ static u32 fsl_spdif_txclk_caldiv(struct fsl_spdif_priv *spdif_priv,
struct clk *clk, u64 savesub, struct clk *clk, u64 savesub,
enum spdif_txrate index, bool round) enum spdif_txrate index, bool round)
{ {
const u32 rate[] = { 32000, 44100, 48000, 96000, 192000 }; static const u32 rate[] = { 32000, 44100, 48000, 96000, 192000 };
bool is_sysclk = clk_is_match(clk, spdif_priv->sysclk); bool is_sysclk = clk_is_match(clk, spdif_priv->sysclk);
u64 rate_ideal, rate_actual, sub; u64 rate_ideal, rate_actual, sub;
u32 sysclk_dfmin, sysclk_dfmax; u32 sysclk_dfmin, sysclk_dfmax;
...@@ -1169,7 +1169,7 @@ static u32 fsl_spdif_txclk_caldiv(struct fsl_spdif_priv *spdif_priv, ...@@ -1169,7 +1169,7 @@ static u32 fsl_spdif_txclk_caldiv(struct fsl_spdif_priv *spdif_priv,
static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv, static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv,
enum spdif_txrate index) enum spdif_txrate index)
{ {
const u32 rate[] = { 32000, 44100, 48000, 96000, 192000 }; static const u32 rate[] = { 32000, 44100, 48000, 96000, 192000 };
struct platform_device *pdev = spdif_priv->pdev; struct platform_device *pdev = spdif_priv->pdev;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
u64 savesub = 100000, ret; u64 savesub = 100000, ret;
......
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