[PATCH] mt76: mt7915: fix misplaced #ifdef
From: Arnd Bergmann
Date: Sun Jan 03 2021 - 08:58:58 EST
From: Arnd Bergmann <arnd@xxxxxxxx>
The lone '|' at the end of a line causes a build failure:
drivers/net/wireless/mediatek/mt76/mt7915/init.c:47:2: error: expected expression before '}' token
Replace the #ifdef with an equivalent IS_ENABLED() check.
Fixes: af901eb4ab80 ("mt76: mt7915: get rid of dbdc debugfs knob")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/net/wireless/mediatek/mt76/mt7915/init.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index ed4635bd151a..f1fb3ae0f7f2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -40,10 +40,9 @@ static const struct ieee80211_iface_limit if_limits[] = {
.types = BIT(NL80211_IFTYPE_ADHOC)
}, {
.max = 16,
- .types = BIT(NL80211_IFTYPE_AP) |
-#ifdef CONFIG_MAC80211_MESH
- BIT(NL80211_IFTYPE_MESH_POINT)
-#endif
+ .types = BIT(NL80211_IFTYPE_AP)
+ | IS_ENABLED(CONFIG_MAC80211_MESH) ?
+ BIT(NL80211_IFTYPE_MESH_POINT) : 0
}, {
.max = MT7915_MAX_INTERFACES,
.types = BIT(NL80211_IFTYPE_STATION)
--
2.29.2