* [PATCH] pinctrl: fix build failure on PPC
@ 2012-04-10 7:52 Linus Walleij
2012-04-10 15:14 ` Stephen Warren
0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2012-04-10 7:52 UTC (permalink / raw)
To: linux-kernel, linux-arm-kernel
Cc: Stephen Warren, Shawn Guo, Thomas Abraham, Dong Aisheng,
Rajendra Nayak, Haojian Zhuang, Linus Walleij, Stephen Rothwell,
Stephen Warren
From: Linus Walleij <linus.walleij@linaro.org>
commit 23289e6ecc6d ("pinctrl: core device tree mapping table
parsing support") caused a build failure on PPC:
drivers/pinctrl/devicetree.c: In function 'dt_free_map':
drivers/pinctrl/devicetree.c:44:42: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c:45:6: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c: In function 'dt_to_map_one_config':
drivers/pinctrl/devicetree.c:140:21: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c:141:10: error: dereferencing pointer to incomplete type
drivers/pinctrl/devicetree.c:146:11: error: dereferencing pointer to incomplete type
This is probably because the Makefile for pinctrl contains this,
that makes a small piece of the implementation build and link
in isolation:
obj-$(CONFIG_OF) += devicetree.o
So let's use some local Kconfig option that depends on both OF
and PINCTRL so that this file is only compiled if you have
both enabled.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/pinctrl/Kconfig | 5 +++++
drivers/pinctrl/Makefile | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index abfb964..d68c878 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -17,6 +17,11 @@ config PINMUX
config PINCONF
bool "Support pin configuration controllers"
+config PINCTRL_OF
+ bool
+ depends on OF
+ default y if OF
+
config GENERIC_PINCONF
bool
select PINCONF
diff --git a/drivers/pinctrl/Makefile b/drivers/pinctrl/Makefile
index 049c9fb..5412f60 100644
--- a/drivers/pinctrl/Makefile
+++ b/drivers/pinctrl/Makefile
@@ -5,7 +5,7 @@ ccflags-$(CONFIG_DEBUG_PINCTRL) += -DDEBUG
obj-$(CONFIG_PINCTRL) += core.o
obj-$(CONFIG_PINMUX) += pinmux.o
obj-$(CONFIG_PINCONF) += pinconf.o
-obj-$(CONFIG_OF) += devicetree.o
+obj-$(CONFIG_PINCTRL_OF) += devicetree.o
obj-$(CONFIG_GENERIC_PINCONF) += pinconf-generic.o
obj-$(CONFIG_PINCTRL_PXA3xx) += pinctrl-pxa3xx.o
obj-$(CONFIG_PINCTRL_MMP2) += pinctrl-mmp2.o
--
1.7.9.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: fix build failure on PPC
2012-04-10 7:52 [PATCH] pinctrl: fix build failure on PPC Linus Walleij
@ 2012-04-10 15:14 ` Stephen Warren
2012-04-11 8:26 ` Linus Walleij
0 siblings, 1 reply; 3+ messages in thread
From: Stephen Warren @ 2012-04-10 15:14 UTC (permalink / raw)
To: Linus Walleij
Cc: linux-kernel, linux-arm-kernel, Stephen Warren, Shawn Guo,
Thomas Abraham, Dong Aisheng, Rajendra Nayak, Haojian Zhuang,
Linus Walleij, Stephen Rothwell
On 04/10/2012 01:52 AM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@linaro.org>
>
> commit 23289e6ecc6d ("pinctrl: core device tree mapping table
> parsing support") caused a build failure on PPC:
>
> drivers/pinctrl/devicetree.c: In function 'dt_free_map':
> drivers/pinctrl/devicetree.c:44:42: error: dereferencing pointer to incomplete type
> drivers/pinctrl/devicetree.c:45:6: error: dereferencing pointer to incomplete type
> drivers/pinctrl/devicetree.c: In function 'dt_to_map_one_config':
> drivers/pinctrl/devicetree.c:140:21: error: dereferencing pointer to incomplete type
> drivers/pinctrl/devicetree.c:141:10: error: dereferencing pointer to incomplete type
> drivers/pinctrl/devicetree.c:146:11: error: dereferencing pointer to incomplete type
>
> This is probably because the Makefile for pinctrl contains this,
> that makes a small piece of the implementation build and link
> in isolation:
>
> obj-$(CONFIG_OF) += devicetree.o
>
> So let's use some local Kconfig option that depends on both OF
> and PINCTRL so that this file is only compiled if you have
> both enabled.
It seems simpler to just fix the Makefile to only compile the file when
its needed directly, without introducing a new Kconfig option. See
https://lkml.org/lkml/2012/4/3/445.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: fix build failure on PPC
2012-04-10 15:14 ` Stephen Warren
@ 2012-04-11 8:26 ` Linus Walleij
0 siblings, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2012-04-11 8:26 UTC (permalink / raw)
To: Stephen Warren
Cc: Linus Walleij, linux-kernel, linux-arm-kernel, Stephen Warren,
Shawn Guo, Thomas Abraham, Dong Aisheng, Rajendra Nayak,
Haojian Zhuang, Stephen Rothwell
On Tue, Apr 10, 2012 at 5:14 PM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 04/10/2012 01:52 AM, Linus Walleij wrote:
>> So let's use some local Kconfig option that depends on both OF
>> and PINCTRL so that this file is only compiled if you have
>> both enabled.
>
> It seems simpler to just fix the Makefile to only compile the file when
> its needed directly, without introducing a new Kconfig option. See
> https://lkml.org/lkml/2012/4/3/445.
But I think it is basically a config problem, not a compilation problem,
that is why I did it this way.
But I won't be stubborn about it ... I'll see if I can just switch that one
patch out then.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-11 8:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-10 7:52 [PATCH] pinctrl: fix build failure on PPC Linus Walleij
2012-04-10 15:14 ` Stephen Warren
2012-04-11 8:26 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox