* [patch] sound/soc/codec : fix build failure in next-201303225
@ 2013-03-25 11:59 Xiong Zhou
2013-03-25 12:06 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Xiong Zhou @ 2013-03-25 11:59 UTC (permalink / raw)
To: linux-next, Mark Brown; +Cc: Stephen Rothwell, linux-kernel, jencce.kernel
From: Xiong Zhou <jencce.kernel@gmail.com>
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).
Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
---
sound/soc/codecs/arizona.c | 8 ++------
sound/soc/codecs/arizona.h | 10 ++++++++--
2 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 26e1579..166db32 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -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);
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h
index a754a1c..3e43456 100644
--- a/sound/soc/codecs/arizona.h
+++ b/sound/soc/codecs/arizona.h
@@ -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[];
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch] sound/soc/codec : fix build failure in next-201303225
2013-03-25 11:59 [patch] sound/soc/codec : fix build failure in next-201303225 Xiong Zhou
@ 2013-03-25 12:06 ` Mark Brown
2013-03-25 12:34 ` Xiong Zhou
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2013-03-25 12:06 UTC (permalink / raw)
To: Xiong Zhou; +Cc: linux-next, Stephen Rothwell, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 460 bytes --]
On Mon, Mar 25, 2013 at 07:59:43PM +0800, Xiong Zhou wrote:
> -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.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] sound/soc/codec : fix build failure in next-201303225
2013-03-25 12:06 ` Mark Brown
@ 2013-03-25 12:34 ` Xiong Zhou
2013-03-25 12:37 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Xiong Zhou @ 2013-03-25 12:34 UTC (permalink / raw)
To: Mark Brown; +Cc: Xiong Zhou, linux-next, Stephen Rothwell, linux-kernel
On Mon, 25 Mar 2013, Mark Brown wrote:
> On Mon, Mar 25, 2013 at 07:59:43PM +0800, Xiong Zhou wrote:
>
> > -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?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] sound/soc/codec : fix build failure in next-201303225
2013-03-25 12:34 ` Xiong Zhou
@ 2013-03-25 12:37 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-03-25 12:37 UTC (permalink / raw)
To: Xiong Zhou; +Cc: linux-next, Stephen Rothwell, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 500 bytes --]
On Mon, Mar 25, 2013 at 08:34:27PM +0800, Xiong Zhou wrote:
> On Mon, 25 Mar 2013, Mark Brown wrote:
> > 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...
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-03-25 12:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-25 11:59 [patch] sound/soc/codec : fix build failure in next-201303225 Xiong Zhou
2013-03-25 12:06 ` Mark Brown
2013-03-25 12:34 ` Xiong Zhou
2013-03-25 12:37 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).