Hi all,
After merging the regulator tree, today's linux-next build (x86_64
allmodconfig) failed like this:
lp872x.c:(.text+0xb0699): undefined reference to `devm_regmap_init_i2c'
drivers/built-in.o: In function `lp872x_driver_init':
lp872x.c:(.init.text+0x81ac): undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `lp872x_driver_exit':
lp872x.c:(.exit.text+0x37e): undefined reference to `i2c_del_driver'
CONFIG_I2C=m in this build.
Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
build") but that was done to fix a different build problem.
I have used the regulator tree from next-20120619 again for today.
--
Cheers,
Stephen Rothwell [email protected]
> Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
> build") but that was done to fix a different build problem.
Sorry for this conflict.
Build config of lp872x driver has been changed as tristate.
And related undefined symbol error has been fixed.
(don't use devm_gpio_request_one() at this moment because it can not be exported.)
Please check patches below.
[PATCH 1/3] regulator: enable module build config for lp872x
[PATCH 2/3] regulator: replace devm_gpio_request_one() for loaded module
Thanks & BR
Milo -
2012/6/21 Kim, Milo <[email protected]>:
>> Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
>> build") but that was done to fix a different build problem.
>
> Sorry for this conflict.
>
> Build config of lp872x driver has been changed as tristate.
> And related undefined symbol error has been fixed.
> (don't use devm_gpio_request_one() at this moment because it can not be exported.)
I don't think this is the good way, other drivers may have this build problem.
I think we can fix it by having the patch exporting
devm_gpio_request_one upstrem ASAP.
BTW, In yesterday's linux-next tree, Andrew has below commit.
commit a291ede7be8359a8986740b11b93f9c80e40210b
Author: Andrew Morton <[email protected]>
Date: Wed Jun 20 09:55:47 2012 +1000
backlight-l4f00242t03-use-devm_gpio_request_one-fix
export devm_gpio_request_one() to modules
Cc: Alberto Panizzo <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: Richard Purdie <[email protected]>
Cc: Grant Likely <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Regards,
Axel
> BTW, In yesterday's linux-next tree, Andrew has below commit.
>
> commit a291ede7be8359a8986740b11b93f9c80e40210b
> Author: Andrew Morton <[email protected]>
> Date: Wed Jun 20 09:55:47 2012 +1000
>
> backlight-l4f00242t03-use-devm_gpio_request_one-fix
>
> export devm_gpio_request_one() to modules
>
> Cc: Alberto Panizzo <[email protected]>
> Cc: Jingoo Han <[email protected]>
> Cc: Richard Purdie <[email protected]>
> Cc: Grant Likely <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>
Axel,
Good, thanks a lot !
Mark,
Then please ignore the patch below.
'[PATCH 2/3] regulator: replace devm_gpio_request_one() for loaded module'
https://lkml.org/lkml/2012/6/21/62
But two patches are still valid.
'[PATCH 1/3] regulator: enable module build config for lp872x'
'[PATCH 3/3] regulator: change message level on probing lp872x driver'
https://lkml.org/lkml/2012/6/21/61
https://lkml.org/lkml/2012/6/21/57
Thanks & BR
Milo -
On Thu, Jun 21, 2012 at 04:20:46PM +0800, Axel Lin wrote:
> I don't think this is the good way, other drivers may have this build problem.
> I think we can fix it by having the patch exporting
> devm_gpio_request_one upstrem ASAP.
This isn't any use until someone actually merges the patch which given
that it's for gpiolib could take a very long time.
On Thu, Jun 21, 2012 at 08:13:15AM +0000, Kim, Milo wrote:
> > Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
> > build") but that was done to fix a different build problem.
>
> Sorry for this conflict.
>
> Build config of lp872x driver has been changed as tristate.
> And related undefined symbol error has been fixed.
> (don't use devm_gpio_request_one() at this moment because it can not be exported.)
I'm not going to apply those patches, they're a step back in terms of
driver quality. We just need to bodge the Kconfig dependencies until
the fix for gpiolib gets merged.
Hi Andrew,
On Thu, 21 Jun 2012 16:20:46 +0800 Axel Lin <[email protected]> wrote:
>
> 2012/6/21 Kim, Milo <[email protected]>:
> >> Caused by commit 809d310c7e69 ("regulator: lp872x: Don't allow modular
> >> build") but that was done to fix a different build problem.
> >
> > Sorry for this conflict.
> >
> > Build config of lp872x driver has been changed as tristate.
> > And related undefined symbol error has been fixed.
> > (don't use devm_gpio_request_one() at this moment because it can not be exported.)
>
> I don't think this is the good way, other drivers may have this build problem.
> I think we can fix it by having the patch exporting
> devm_gpio_request_one upstrem ASAP.
>
> BTW, In yesterday's linux-next tree, Andrew has below commit.
>
> commit a291ede7be8359a8986740b11b93f9c80e40210b
> Author: Andrew Morton <[email protected]>
> Date: Wed Jun 20 09:55:47 2012 +1000
>
> backlight-l4f00242t03-use-devm_gpio_request_one-fix
>
> export devm_gpio_request_one() to modules
>
> Cc: Alberto Panizzo <[email protected]>
> Cc: Jingoo Han <[email protected]>
> Cc: Richard Purdie <[email protected]>
> Cc: Grant Likely <[email protected]>
> Signed-off-by: Andrew Morton <[email protected]>
This export is needed for a patch in the regulator tree, so can we have
that patch sent to Linus ASAP, please?
--
Cheers,
Stephen Rothwell [email protected]
On Thu, Jun 21, 2012 at 09:04:12PM +1000, Stephen Rothwell wrote:
> This export is needed for a patch in the regulator tree, so can we have
> that patch sent to Linus ASAP, please?
It's going to affect pretty much anything that tries to use the API.
On Thu, 21 Jun 2012 21:04:12 +1000 Stephen Rothwell <[email protected]> wrote:
> This export is needed for a patch in the regulator tree, so can we have
> that patch sent to Linus ASAP, please?
Shall do.
From: Andrew Morton <[email protected]>
Subject: drivers/gpio/devres.c: export devm_gpio_request_one() to modules
Several drivers in linux-next and possibly mainline are failing due to
this missing export.
Cc: Alberto Panizzo <[email protected]>
Cc: Jingoo Han <[email protected]>
Cc: Richard Purdie <[email protected]>
Cc: Grant Likely <[email protected]>
Cc: Mark Brown <[email protected]>
Cc: Stephen Rothwell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---
drivers/gpio/devres.c | 1 +
1 file changed, 1 insertion(+)
diff -puN drivers/gpio/devres.c~drivers-gpio-devresc-export-devm_gpio_request_one-to-modules drivers/gpio/devres.c
--- a/drivers/gpio/devres.c~drivers-gpio-devresc-export-devm_gpio_request_one-to-modules
+++ a/drivers/gpio/devres.c
@@ -98,6 +98,7 @@ int devm_gpio_request_one(struct device
return 0;
}
+EXPORT_SYMBOL(devm_gpio_request_one);
/**
* devm_gpio_free - free an interrupt
_