Re: [PATCH] pinctrl: fix build failure on PPC

From: Stephen Warren
Date: Tue Apr 10 2012 - 11:14:27 EST


On 04/10/2012 01:52 AM, Linus Walleij wrote:
> From: Linus Walleij <linus.walleij@xxxxxxxxxx>
>
> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/