3fbf0dedd94667d500eb35c08d756803b9e2d42f
[openwrt/staging/blocktrron.git] /
1 From cb34212b1c25f7656a315f956d72696777e88340 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Sun, 1 Sep 2019 13:34:35 +0200
4 Subject: [PATCH] brcmfmac: add stub version of brcmf_debugfs_get_devdir()
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 In case of compiling driver without DEBUG expose a stub function to make
10 writing debug code much simpler (no extra conditions). This will allow
11 e.g. using debugfs_create_file() without any magic if or #ifdef.
12
13 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
14 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
15 ---
16 drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h | 4 ++++
17 1 file changed, 4 insertions(+)
18
19 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
20 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/debug.h
21 @@ -121,6 +121,10 @@ int brcmf_debugfs_add_entry(struct brcmf
22 int brcmf_debug_create_memdump(struct brcmf_bus *bus, const void *data,
23 size_t len);
24 #else
25 +static inline struct dentry *brcmf_debugfs_get_devdir(struct brcmf_pub *drvr)
26 +{
27 + return ERR_PTR(-ENOENT);
28 +}
29 static inline
30 int brcmf_debugfs_add_entry(struct brcmf_pub *drvr, const char *fn,
31 int (*read_fn)(struct seq_file *seq, void *data))