ASoC: rt286: Fix the runtime error in the booting
Subsystems (3)
Oder Chiou
maintainerPATCH v2 1/1 ASoC: rt286: Fix the runtime error in the booting
The struct rt286_index_def was used by the cache function, so it cannot be declared as const.
Signed-off-by Oder Chiou <[email protected]>
--- sound/soc/codecs/rt286.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/codecs/rt286.c +2 -2
@@ -37,7 +37,7 @@#define RT288_VENDOR_ID 0x10ec0288struct 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 },
Signature · 1 line
1.8.1.1.439.g50a6b54
Mark Brown
maintainerQuoted 2 lines · Oder Chiou
The struct
rt286_index_defwas used by the cache function, so it cannot be declared as const.
Like I say I don't understand why this is safe.