diff mbox

[v2] ASoC: rt286: Fix the runtime error in the booting

Message ID 1444018228-18893-1-git-send-email-oder_chiou@realtek.com (mailing list archive)
State New, archived
Headers show

Commit Message

Oder Chiou Oct. 5, 2015, 4:10 a.m. UTC
The struct rt286_index_def was used by the cache function, so it cannot be
declared as const.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
 sound/soc/codecs/rt286.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mark Brown Oct. 5, 2015, 9:58 a.m. UTC | #1
On Mon, Oct 05, 2015 at 12:10:28PM +0800, Oder Chiou wrote:
> The struct rt286_index_def was used by the cache function, so it cannot be
> declared as const.

Like I say I don't understand why this is safe.
diff mbox

Patch

diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 1fbdb4f..a7178ac 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -37,7 +37,7 @@ 
 #define RT288_VENDOR_ID 0x10ec0288
 
 struct rt286_priv {
-	const struct reg_default *index_cache;
+	struct reg_default *index_cache;
 	int index_cache_size;
 	struct regmap *regmap;
 	struct snd_soc_codec *codec;
@@ -49,7 +49,7 @@  struct rt286_priv {
 	int clk_id;
 };
 
-static const struct reg_default rt286_index_def[] = {
+static struct reg_default rt286_index_def[] = {
 	{ 0x01, 0xaaaa },
 	{ 0x02, 0x8aaa },
 	{ 0x03, 0x0002 },