Skip to content

Commit 5f591da

Browse files
Gidon Studinskikvalo
authored andcommitted
wil6210: make debugfs compilation optional
Since debugfs is a kernel configuration option, enable the driver to compile without debugfs. Signed-off-by: Gidon Studinski <[email protected]> Signed-off-by: Hamad Kadmany <[email protected]> Signed-off-by: Maya Erez <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent 40cbd88 commit 5f591da

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

drivers/net/wireless/ath/wil6210/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,15 @@ config WIL6210_TRACING
4040
option if you are interested in debugging the driver.
4141

4242
If unsure, say Y to make it easier to debug problems.
43+
44+
config WIL6210_DEBUGFS
45+
bool "wil6210 debugfs support"
46+
depends on WIL6210
47+
depends on DEBUG_FS
48+
default y
49+
---help---
50+
Say Y here to enable wil6210 debugfs support, using the
51+
kernel debugfs infrastructure. Select this
52+
option if you are interested in debugging the driver.
53+
54+
If unsure, say Y to make it easier to debug problems.

drivers/net/wireless/ath/wil6210/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ wil6210-y := main.o
44
wil6210-y += netdev.o
55
wil6210-y += cfg80211.o
66
wil6210-y += pcie_bus.o
7-
wil6210-y += debugfs.o
7+
wil6210-$(CONFIG_WIL6210_DEBUGFS) += debugfs.o
88
wil6210-y += wmi.o
99
wil6210-y += interrupt.o
1010
wil6210-y += txrx.o

drivers/net/wireless/ath/wil6210/wil6210.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,8 +940,14 @@ int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
940940
struct cfg80211_mgmt_tx_params *params,
941941
u64 *cookie);
942942

943+
#if defined(CONFIG_WIL6210_DEBUGFS)
943944
int wil6210_debugfs_init(struct wil6210_priv *wil);
944945
void wil6210_debugfs_remove(struct wil6210_priv *wil);
946+
#else
947+
static inline int wil6210_debugfs_init(struct wil6210_priv *wil) { return 0; }
948+
static inline void wil6210_debugfs_remove(struct wil6210_priv *wil) {}
949+
#endif
950+
945951
int wil_cid_fill_sinfo(struct wil6210_priv *wil, int cid,
946952
struct station_info *sinfo);
947953

0 commit comments

Comments
 (0)