sound/soc/codec : fix build failure in next-201303225
Subsystems (4)
PATCH 1/1 sound/soc/codec : fix build failure in next-201303225
From: Xiong Zhou <[email protected]>
This patch fixes build failure of next-20130325 (and also next-20130322), about sound soc codec modules, based on previous implementation. Failing message:
MODPOST 2490 modules
ERROR: "arizona_rate_text" [sound/soc/codecs/snd-soc-wm-adsp.ko] undefined!
ERROR: "arizona_rate_val" [sound/soc/codecs/snd-soc-wm-adsp.ko] undefined!
WARNING: modpost: Found 5 section mismatch(es).
---sound/soc/codecs/arizona.c | 8 ++------sound/soc/codecs/arizona.h | 10 ++++++++--
2 files changed, 10 insertions(+), 8 deletions(-)
sound/soc/codecs/arizona.c +2 -6
@@ -433,14 +433,10 @@ EXPORT_SYMBOL_GPL(arizona_mixer_values); const DECLARE_TLV_DB_SCALE(arizona_mixer_tlv, -3200, 100, 0);EXPORT_SYMBOL_GPL (arizona_mixer_tlv); -const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE ] = { -"SYNCCLK rate" ,"8kHz" ,"16kHz" ,"ASYNCCLK rate" , -}; +extern const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE ];EXPORT_SYMBOL_GPL (arizona_rate_text); -const int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE ] = { -0 ,1 ,2 ,8 , -}; +extern const int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE ];EXPORT_SYMBOL_GPL (arizona_rate_val);
sound/soc/codecs/arizona.h +8 -2
@@ -181,8 +181,14 @@ extern int arizona_mixer_values[ARIZONA_NUM_MIXER_INPUTS]; ARIZONA_MIXER_ROUTES(name, name "R")#define ARIZONA_RATE_ENUM_SIZE 4 -extern const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE ]; -extern const int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE ]; + +const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE ] = { +"SYNCCLK rate" ,"8kHz" ,"16kHz" ,"ASYNCCLK rate" , +}; + +const int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE ] = { +0 ,1 ,2 ,8 , +};extern const struct soc_enum arizona_isrc_fsl[];
sound/soc/codecs/arizona.c EXPORT_SYMBOL_GPL(arizona_mixer_values); · line 437
Quoted 5 lines · Xiong Zhou
sound/soc/codecs/arizona.c +1
-3-const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE ] = { -"SYNCCLK rate" ,"8kHz" ,"16kHz" ,"ASYNCCLK rate" , -}; +extern const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE ];EXPORT_SYMBOL_GPL (arizona_rate_text);
No, this isn't a good fix at all - we're moving the array to the header but still exporting it from this file which is not clever at all. The user should be conditional.
Quoted 12 lines · Mark Brown
sound/soc/codecs/arizona.c EXPORT_SYMBOL_GPL(arizona_mixer_values); · line 437
Quoted 5 lines · Xiong Zhou
sound/soc/codecs/arizona.c +1
-3-const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE ] = { -"SYNCCLK rate" ,"8kHz" ,"16kHz" ,"ASYNCCLK rate" , -}; +extern const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE ];EXPORT_SYMBOL_GPL (arizona_rate_text);No, this isn't a good fix at all - we're moving the array to the header but still exporting it from this file which is not clever at all. The user should be conditional.
Yes, I agree with you much. Do you have some plan with this array? The exproting seems not necesary right now, How about just moving the array to the header?
Quoted 9 lines · Xiong Zhou
Quoted 3 lines · Mark Brown
No, this isn't a good fix at all - we're moving the array to the header but still exporting it from this file which is not clever at all. The user should be conditional.
Yes, I agree with you much. Do you have some plan with this array? The exproting seems not necesary right now, How about just moving the array to the header?
Exactly what I said in my reply...