Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85beabfe authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

net: dsa: include gpio consumer header file



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: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: cc30c163 ("net: dsa: Add support for a switch reset gpio")
Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 57ef5527
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/of_gpio.h>
#include <linux/of_gpio.h>
#include <linux/sysfs.h>
#include <linux/sysfs.h>
#include <linux/phy_fixed.h>
#include <linux/phy_fixed.h>
#include <linux/gpio/consumer.h>
#include "dsa_priv.h"
#include "dsa_priv.h"


char dsa_driver_version[] = "0.1";
char dsa_driver_version[] = "0.1";