2013-10-29 09:10:37

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the final tree (gpio tree related)

Hi all,

After merging the final tree, today's linux-next build (sparc32 defconfig)
failed like this:

In file included from drivers/spi/spi.c:33:0:
include/linux/of_gpio.h: In function 'of_get_named_gpio_flags':
include/linux/of_gpio.h:93:3: error: implicit declaration of function 'desc_to_gpio' [-Werror=implicit-function-declaration]

Caused by commit af8b6375a829 ("gpiolib: port of_ functions to use
gpiod") from the gpio tree.

I have applied the following patch for today (it should go into the gpio
tree if it is considered correct):

From: Stephen Rothwell <[email protected]>
Date: Tue, 29 Oct 2013 20:05:12 +1100
Subject: [PATCH] gpiolib: include gpio/consumer.h in of_gpio.h for
desc_to_gpio()

Fixes this build error on sparc:

In file included from drivers/spi/spi.c:33:0:
include/linux/of_gpio.h: In function 'of_get_named_gpio_flags':
include/linux/of_gpio.h:93:3: error: implicit declaration of function 'desc_to_gpio' [-Werror=implicit-function-declaration]

Signed-off-by: Stephen Rothwell <[email protected]>
---
include/linux/of_gpio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/of_gpio.h b/include/linux/of_gpio.h
index d71f2cc141ae..f14123a5a9df 100644
--- a/include/linux/of_gpio.h
+++ b/include/linux/of_gpio.h
@@ -19,9 +19,9 @@
#include <linux/errno.h>
#include <linux/gpio.h>
#include <linux/of.h>
+#include <linux/gpio/consumer.h>

struct device_node;
-struct gpio_desc;

/*
* This is Linux-specific flags. By default controllers' and Linux' mapping
--
1.8.4.rc3

--
Cheers,
Stephen Rothwell [email protected]


Attachments:
(No filename) (1.58 kB)
(No filename) (836.00 B)
Download all attachments

2013-10-29 13:25:15

by Linus Walleij

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (gpio tree related)

On Tue, Oct 29, 2013 at 10:10 AM, Stephen Rothwell <[email protected]> wrote:

> I have applied the following patch for today (it should go into the gpio
> tree if it is considered correct):
>
> From: Stephen Rothwell <[email protected]>
> Date: Tue, 29 Oct 2013 20:05:12 +1100
> Subject: [PATCH] gpiolib: include gpio/consumer.h in of_gpio.h for
> desc_to_gpio()
>
> Fixes this build error on sparc:
>
> In file included from drivers/spi/spi.c:33:0:
> include/linux/of_gpio.h: In function 'of_get_named_gpio_flags':
> include/linux/of_gpio.h:93:3: error: implicit declaration of function 'desc_to_gpio' [-Werror=implicit-function-declaration]
>
> Signed-off-by: Stephen Rothwell <[email protected]>

Patch applied, unless Alexandre has any considerations.

Yours,
Linus Walleij

2013-10-30 00:56:23

by Alexandre Courbot

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the final tree (gpio tree related)

On 10/29/2013 10:25 PM, Linus Walleij wrote:
> On Tue, Oct 29, 2013 at 10:10 AM, Stephen Rothwell <[email protected]> wrote:
>
>> I have applied the following patch for today (it should go into the gpio
>> tree if it is considered correct):
>>
>> From: Stephen Rothwell <[email protected]>
>> Date: Tue, 29 Oct 2013 20:05:12 +1100
>> Subject: [PATCH] gpiolib: include gpio/consumer.h in of_gpio.h for
>> desc_to_gpio()
>>
>> Fixes this build error on sparc:
>>
>> In file included from drivers/spi/spi.c:33:0:
>> include/linux/of_gpio.h: In function 'of_get_named_gpio_flags':
>> include/linux/of_gpio.h:93:3: error: implicit declaration of function 'desc_to_gpio' [-Werror=implicit-function-declaration]
>>
>> Signed-off-by: Stephen Rothwell <[email protected]>
>
> Patch applied, unless Alexandre has any considerations.

Nope, that include should definitely be there, actually I was convinced
it was already...

Alex.