net: dsa: mt7530: Include gpio/consumer.h for GPIO functions
authorFlorian Fainelli <f.fainelli@gmail.com>
Sat, 8 Apr 2017 15:52:02 +0000 (08:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Apr 2017 01:28:54 +0000 (18:28 -0700)
Fixes build errors seen with CONFIG_GPIOLIB disabled and warnings enabled:

drivers/net/dsa/mt7530.c: In function 'mt7530_setup':
drivers/net/dsa/mt7530.c:948:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration]
   gpiod_set_value_cansleep(priv->reset, 0);
   ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/mt7530.c: In function 'mt7530_probe':
drivers/net/dsa/mt7530.c:1068:17: error: implicit declaration of function 'devm_gpiod_get_optional' [-Werror=implicit-function-declaration]
   priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
                 ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/dsa/mt7530.c:1069:13: error: 'GPIOD_OUT_LOW' undeclared (first use in this function)
             GPIOD_OUT_LOW);
             ^~~~~~~~~~~~~
drivers/net/dsa/mt7530.c:1069:13:

Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mt7530.c

index a4f3b0b8c28e4a65b68e913e68e7230d1883ea19..b070c167e70fc37d301050e5cb00265053322ea4 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/regmap.h>
 #include <linux/regulator/consumer.h>
 #include <linux/reset.h>
+#include <linux/gpio/consumer.h>
 #include <net/dsa.h>
 #include <net/switchdev.h>