diff mbox

ASoC: max9867: make array ni_div static const

Message ID 20170622093231.11389-1-colin.king@canonical.com (mailing list archive)
State Accepted
Commit 1943b0661184a5d17f31624dc8ac2c02a086c998
Headers show

Commit Message

Colin King June 22, 2017, 9:32 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The array ni_div does not need to be in global scope and is not
modified, so make it static const.

Cleans up sparse warning:
"symbol 'ni_div' was not declared. Should it be static?"

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 sound/soc/codecs/max9867.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul June 22, 2017, 10:30 a.m. UTC | #1
On Thu, Jun 22, 2017 at 10:32:31AM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The array ni_div does not need to be in global scope and is not
> modified, so make it static const.
> 
> Cleans up sparse warning:
> "symbol 'ni_div' was not declared. Should it be static?"

Acked-By: Vinod Koul <vinod.koul@intel.com>
diff mbox

Patch

diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index 0247edc9c84e..2a40a69a7513 100644
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -132,7 +132,7 @@  enum rates {
 	pcm_rate_48, max_pcm_rate,
 };
 
-struct ni_div_rates {
+static const struct ni_div_rates {
 	u32 mclk;
 	u16 ni[max_pcm_rate];
 } ni_div[] = {