提交 eb976a55 编写于 作者: F Florian Fainelli 提交者: David S. Miller

net: dsa: mt7530: Include gpio/consumer.h for GPIO functions

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: b8f126a8 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3c60a531
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/regmap.h> #include <linux/regmap.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/reset.h> #include <linux/reset.h>
#include <linux/gpio/consumer.h>
#include <net/dsa.h> #include <net/dsa.h>
#include <net/switchdev.h> #include <net/switchdev.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册