[PATCH 3/3] net: dsa: mt7530: add GPIOLIB dependency

From: Arnd Bergmann
Date: Thu Feb 25 2021 - 09:41:11 EST


From: Arnd Bergmann <arnd@xxxxxxxx>

The new gpio support may be optional at runtime, but it requires
building against gpiolib:

ERROR: modpost: "gpiochip_get_data" [drivers/net/dsa/mt7530.ko] undefined!
ERROR: modpost: "devm_gpiochip_add_data_with_key" [drivers/net/dsa/mt7530.ko] undefined!

Add a Kconfig dependency to enforce this.

Fixes: 429a0edeefd8 ("net: dsa: mt7530: MT7530 optional GPIO support")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/net/dsa/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index 3af373e90806..07fc2a732597 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -37,6 +37,7 @@ config NET_DSA_LANTIQ_GSWIP
config NET_DSA_MT7530
tristate "MediaTek MT753x and MT7621 Ethernet switch support"
depends on NET_DSA
+ depends on GPIOLIB
select NET_DSA_TAG_MTK
help
This enables support for the MediaTek MT7530, MT7531, and MT7621
--
2.29.2