Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1276344 > unrolled thread

[PATCH] net: dsa: include gpio consumer header file

Started byArnd Bergmann <arnd@arndb.de>
First post2015-11-24 12:40 +0100
Last post2015-11-24 17:30 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] net: dsa: include gpio consumer header file Arnd Bergmann <arnd@arndb.de> - 2015-11-24 12:40 +0100
    Re: [PATCH] net: dsa: include gpio consumer header file Andrew Lunn <andrew@lunn.ch> - 2015-11-24 15:20 +0100
    Re: [PATCH] net: dsa: include gpio consumer header file David Miller <davem@davemloft.net> - 2015-11-24 17:30 +0100

#1276344 — [PATCH] net: dsa: include gpio consumer header file

FromArnd Bergmann <arnd@arndb.de>
Date2015-11-24 12:40 +0100
Subject[PATCH] net: dsa: include gpio consumer header file
Message-ID<qyk6Z-7vv-5@gated-at.bofh.it>
After the introduction of the switch gpio reset API, I'm getting
build errors in configurations that disable CONFIG_GPIOLIB:

net/dsa/dsa.c:783:16: error: implicit declaration of function 'gpio_to_desc' [-Werror=implicit-function-declaration]

The reason is that linux/gpio/consumer.h is not automatically
included without gpiolib support. This adds an explicit #include
statement to make it compile in all configurations. The reset
functionality will not work without gpiolib, which is what you
get when disabling the feature.

As far as I can tell, gpiolib is supported on all architectures
on which you can have DSA at the moment.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: cc30c16344fc ("net: dsa: Add support for a switch reset gpio")

diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 0b5565f923cc..b7448c8490ac 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -24,6 +24,7 @@
 #include <linux/of_gpio.h>
 #include <linux/sysfs.h>
 #include <linux/phy_fixed.h>
+#include <linux/gpio/consumer.h>
 #include "dsa_priv.h"
 
 char dsa_driver_version[] = "0.1";

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1276510

FromAndrew Lunn <andrew@lunn.ch>
Date2015-11-24 15:20 +0100
Message-ID<qymBP-JT-13@gated-at.bofh.it>
In reply to#1276344
On Tue, Nov 24, 2015 at 12:34:49PM +0100, Arnd Bergmann wrote:
> After the introduction of the switch gpio reset API, I'm getting
> build errors in configurations that disable CONFIG_GPIOLIB:
> 
> net/dsa/dsa.c:783:16: error: implicit declaration of function 'gpio_to_desc' [-Werror=implicit-function-declaration]
> 
> The reason is that linux/gpio/consumer.h is not automatically
> included without gpiolib support. This adds an explicit #include
> statement to make it compile in all configurations. The reset
> functionality will not work without gpiolib, which is what you
> get when disabling the feature.
> 
> As far as I can tell, gpiolib is supported on all architectures
> on which you can have DSA at the moment.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: cc30c16344fc ("net: dsa: Add support for a switch reset gpio")

Hi Arnd

Thanks for this. I had something similar in my github overnight so
that 0-day would build test it.

Acked-by: Andrew Lunn <andrew@lunn.ch>

Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1276619

FromDavid Miller <davem@davemloft.net>
Date2015-11-24 17:30 +0100
Message-ID<qyoDG-262-67@gated-at.bofh.it>
In reply to#1276344
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 24 Nov 2015 12:34:49 +0100

> After the introduction of the switch gpio reset API, I'm getting
> build errors in configurations that disable CONFIG_GPIOLIB:
> 
> net/dsa/dsa.c:783:16: error: implicit declaration of function 'gpio_to_desc' [-Werror=implicit-function-declaration]
> 
> The reason is that linux/gpio/consumer.h is not automatically
> included without gpiolib support. This adds an explicit #include
> statement to make it compile in all configurations. The reset
> functionality will not work without gpiolib, which is what you
> get when disabling the feature.
> 
> As far as I can tell, gpiolib is supported on all architectures
> on which you can have DSA at the moment.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: cc30c16344fc ("net: dsa: Add support for a switch reset gpio")

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web