Subject: Re: linux-next: mfd tree build failure

From: Haojian Zhuang <[email-masked]>
Date: Mon, 11 Jan 2010 07:02:14 -0500

On Mon, Jan 11, 2010 at 5:51 AM, Mark Brown
<[email-masked]> wrote:
> On Mon, Jan 11, 2010 at 04:02:32PM +1100, Stephen Rothwell wrote:
>> Hi Sam,
>
>> Today's linux-next build (x86_64_allmodconfig, gcc 4.4.0, binutils
>> 2.19.1) failed like this:
>
>> ERROR: "max8925_set_bits" [drivers/video/backlight/max8925_bl.ko] undefined!
>> ERROR: "max8925_reg_write" [drivers/video/backlight/max8925_bl.ko] undefined!
>> ERROR: "max8925_reg_read" [drivers/video/backlight/max8925_bl.ko] undefined!
>> ERROR: "max8925_set_bits" [drivers/regulator/max8925.ko] undefined!
>> ERROR: "max8925_reg_read" [drivers/regulator/max8925.ko] undefined!
>
>> I am not sure what caused this, so I have used the version of the mfd
>> tree from next-20100108 for today.
>
> CCing in Haojian who did the driver.  I've not looked but I'd guess that
> the issue is missing EXPORT_SYMBOL{,_GPL}s on the symbols above.
>

I'm sorry on inconvience. Now I attache the fix.

Samuel,
Could you help to review and merge this patch?

It's not caused by EXPORT_SYMBOL{,_GPL}. If I build in max8925 mfd
driver, issue is resolved.
Regulator subsystem could only be built in. And 8925 regulator driver
calls i2c operations that is defined in mfd driver. If 8925 regulator
is built it and mfd 8925 is built as module, it will cause linking
error.

Thanks
Haojian
From cc08aae952302cbc4445f4db49fdfab5f9d779ed Mon Sep 17 00:00:00 2001
From: Haojian Zhuang <[email-masked]>
Date: Mon, 11 Jan 2010 14:38:39 -0500
Subject: [PATCH] mfd: set max8925 as built in

Since regulator module is always built-in, MFD driver have to be built in.
If MFD driver is built as module, linking error will occur.

Signed-off-by: Haojian Zhuang <[email-masked]>
---
 drivers/mfd/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 94e4d5e..b892c38 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -186,7 +186,7 @@ config PMIC_ADP5520
 
 config MFD_MAX8925
 	tristate "Maxim Semiconductor MAX8925 PMIC Support"
-	depends on I2C
+	depends on I2C=y
 	select MFD_CORE
 	help
 	  Say yes here to support for Maxim Semiconductor MAX8925. This is
-- 
1.5.6.5